Solana RPC gateway для клиента и сервера

This commit is contained in:
AidarKC
2026-10-18 00:03:46 +03:00
parent b67d06ce43
commit aa5addb5d9
17 changed files with 228 additions and 85 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
import { confirmSolanaTransactionHttp, getSolanaCluster } from '../services/solana-rpc-gateway.js';
import { createTopBar } from '../components/topbar.js';
import {
SHINE_USERS_ECONOMY_CONFIG_SEED,
SHINE_USERS_PROGRAM_ID,
SOLANA_CLUSTER,
} from '../solana-programs.js';
import { state } from '../state.js';
import { loadSolanaWeb3 } from '../vendor/solana-web3-loader.js';
@@ -136,7 +136,7 @@ export function render({navigate, chrome}) {
const signed = await provider.signTransaction(tx);
const sig = await connection.sendRawTransaction(signed.serialize(), { skipPreflight: false });
await connection.confirmTransaction({ signature: sig, blockhash, lastValidBlockHeight }, 'confirmed');
await confirmSolanaTransactionHttp(connection, sig, { lastValidBlockHeight });
txLine.textContent = `TX: ${sig}`;
status.textContent = 'Успешно: init_users_economy_config выполнен.';
@@ -159,7 +159,7 @@ export function render({navigate, chrome}) {
(() => {
const t = document.createElement('p');
t.className = 'meta-muted';
t.textContent = `Cluster: ${SOLANA_CLUSTER}`;
t.textContent = `Cluster: ${getSolanaCluster() || "не определён"}`;
return t;
})(),
(() => {