Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix: Solana deploy confirmation + pump-dashboard nav handler scope

nirholasfdbe8179ad9f
diff --git a/publish/src/erc8004/solana-deploy.js b/publish/src/erc8004/solana-deploy.js
index 579226a2f..fe310e607 100644
--- a/publish/src/erc8004/solana-deploy.js
+++ b/publish/src/erc8004/solana-deploy.js
@@ -50,6 +50,30 @@ function decodeBase64Tx(b64) {
}
}
+// Poll signature status over HTTP. Avoids Connection.confirmTransaction, which
+// opens a WebSocket subscription — public mainnet-beta refuses WS, so the
+// confirm step hangs until the wallet times out.
+async function waitForSolanaConfirmation(conn, signature, timeoutMs) {
+ const deadline = Date.now() + timeoutMs;
+ while (Date.now() < deadline) {
+ const { value } = await conn.getSignatureStatuses([signature]);
+ const status = value?.[0];
+ if (status) {
+ if (status.err) {
+ throw new Error(`Tx failed: ${JSON.stringify(status.err)}`);
+ }
+ if (
+ status.confirmationStatus === 'confirmed' ||
+ status.confirmationStatus === 'finalized'
+ ) {
+ return;
+ }
+ }
+ await new Promise((r) => setTimeout(r, 1500));
+ }
+ throw new Error('Timed out waiting for Solana transaction confirmation.');
+}
+
/**
* Run the Solana deploy flow end-to-end.
*
@@ -148,7 +172,7 @@ export async function runSolanaDeploy({ agent, network, vanity }) {
// Wait for confirmation before calling the server.
const conn3 = new Connection(endpoint, 'confirmed');
- await conn3.confirmTransaction(signature, 'confirmed');
+ await waitForSolanaConfirmation(conn3, signature, 60_000);
const confirmResp = await fetch('/api/agents/solana-register-confirm', {
method: 'POST',
diff --git a/pump-dashboard.html b/pump-dashboard.html
index 71981c24e..5eda6d567 100644
--- a/pump-dashboard.html
+++ b/pump-dashboard.html
@@ -1079,6 +1079,17 @@ function navigateTo(page) {
a.classList.toggle('active', a.dataset.page === page);
});
if (page === 'animations') loadAgent();
+
+ const titles = {
+ dashboard: 'Dashboard', feed: 'Live Feed', watches: 'Watch List',
+ claims: 'Fee Claims', alerts: 'Alerts', scanner: 'Token Scanner',
+ quoting: 'Quote Engine', vanity: 'Vanity Generator',
+ config: 'Configuration', api: 'API Keys', animations: 'Animations',
+ };
+ document.getElementById('page-title').textContent = titles[page] || page;
+
+ if (page === 'watches') refreshWatches();
+ if (page === 'claims') refreshClaims();
}
// ── Agent Control ─────────────────────────────────────────────────────
@@ -1148,19 +1159,6 @@ function playAnimation() {
}, '*');
}
- const titles = {
- dashboard: 'Dashboard', feed: 'Live Feed', watches: 'Watch List',
- claims: 'Fee Claims', alerts: 'Alerts', scanner: 'Token Scanner',
- quoting: 'Quote Engine', vanity: 'Vanity Generator',
- config: 'Configuration', api: 'API Keys', animations: 'Animations',
- };
- document.getElementById('page-title').textContent = titles[page] || page;
-
- // Load data for the page
- if (page === 'watches') refreshWatches();
- if (page === 'claims') refreshClaims();
-}
-
// ── API Connection ────────────────────────────────────────────────────
let healthInterval;
diff --git a/src/erc8004/solana-deploy.js b/src/erc8004/solana-deploy.js
index 579226a2f..fe310e607 100644
--- a/src/erc8004/solana-deploy.js
+++ b/src/erc8004/solana-deploy.js
@@ -50,6 +50,30 @@ function decodeBase64Tx(b64) {
}
}
+// Poll signature status over HTTP. Avoids Connection.confirmTransaction, which
+// opens a WebSocket subscription — public mainnet-beta refuses WS, so the
+// confirm step hangs until the wallet times out.
+async function waitForSolanaConfirmation(conn, signature, timeoutMs) {
+ const deadline = Date.now() + timeoutMs;
+ while (Date.now() < deadline) {
+ const { value } = await conn.getSignatureStatuses([signature]);
+ const status = value?.[0];
+ if (status) {
+ if (status.err) {
+ throw new Error(`Tx failed: ${JSON.stringify(status.err)}`);
+ }
+ if (
+ status.confirmationStatus === 'confirmed' ||
+ status.confirmationStatus === 'finalized'
+ ) {
+ return;
+ }
+ }
+ await new Promise((r) => setTimeout(r, 1500));
+ }
+ throw new Error('Timed out waiting for Solana transaction confirmation.');
+}
+
/**
* Run the Solana deploy flow end-to-end.
*
@@ -148,7 +172,7 @@ export async function runSolanaDeploy({ agent, network, vanity }) {
// Wait for confirmation before calling the server.
const conn3 = new Connection(endpoint, 'confirmed');
- await conn3.confirmTransaction(signature, 'confirmed');
+ await waitForSolanaConfirmation(conn3, signature, 60_000);
const confirmResp = await fetch('/api/agents/solana-register-confirm', {
method: 'POST',
diff --git a/tutorials.html b/tutorials.html
index 397900238..68fb936b8 100644
--- a/tutorials.html
+++ b/tutorials.html
@@ -29,6 +29,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="stylesheet" href="/style.css" />
+ <link rel="stylesheet" href="/nav.css" />
<link rel="stylesheet" href="/home.css" />
<link rel="stylesheet" href="/footer.css" />
<script defer src="/footer-newsletter.js"></script>