SHA256
Перевести тестовый контур на t.shineup.me
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
getBalanceSol,
|
||||
getTopupSiteUrl,
|
||||
} from '../services/solana-wallet-service.js';
|
||||
import { loadSolanaWeb3 } from '../vendor/solana-web3-loader.js';
|
||||
import {
|
||||
formatSolanaErrorDetails,
|
||||
isUserAlreadyExistsSolanaError,
|
||||
@@ -185,7 +186,7 @@ export function render({ navigate }) {
|
||||
const raw = atob(publicKeyB64);
|
||||
const bytes = new Uint8Array(raw.length);
|
||||
for (let i = 0; i < raw.length; i++) bytes[i] = raw.charCodeAt(i);
|
||||
const { PublicKey } = await import('https://esm.sh/@solana/web3.js@1.98.4');
|
||||
const { PublicKey } = await loadSolanaWeb3();
|
||||
const address = new PublicKey(bytes).toBase58();
|
||||
state.registrationPayment.walletAddress = address;
|
||||
walletValue.value = address;
|
||||
|
||||
@@ -5,13 +5,14 @@ import {
|
||||
SOLANA_CLUSTER,
|
||||
} from '../solana-programs.js';
|
||||
import { state } from '../state.js';
|
||||
import { loadSolanaWeb3 } from '../vendor/solana-web3-loader.js';
|
||||
|
||||
export const pageMeta = { id: 'solana-users-init-view', title: 'Solana Init (users)' };
|
||||
|
||||
let solanaLibPromise = null;
|
||||
function loadSolanaLib() {
|
||||
if (!solanaLibPromise) {
|
||||
solanaLibPromise = import('https://esm.sh/@solana/web3.js@1.98.4?bundle');
|
||||
solanaLibPromise = loadSolanaWeb3();
|
||||
}
|
||||
return solanaLibPromise;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
getTopupSiteUrl,
|
||||
requestAirdropSol,
|
||||
} from '../services/solana-wallet-service.js';
|
||||
import { loadSolanaWeb3 } from '../vendor/solana-web3-loader.js';
|
||||
|
||||
export const pageMeta = { id: 'topup-view', title: 'Пополнение счета', showAppChrome: false };
|
||||
|
||||
@@ -20,7 +21,7 @@ async function clientWalletAddressFromBundle() {
|
||||
const raw = atob(keyBundle.clientPair.publicKeyB64);
|
||||
const bytes = new Uint8Array(raw.length);
|
||||
for (let i = 0; i < raw.length; i += 1) bytes[i] = raw.charCodeAt(i);
|
||||
const { PublicKey } = await import('https://esm.sh/@solana/web3.js@1.98.4');
|
||||
const { PublicKey } = await loadSolanaWeb3();
|
||||
return new PublicKey(bytes).toBase58();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user