Bug: Bridge from Solana button silently fails — no error when Phantom rejects localnet #92

Closed
opened 2026-03-31 08:57:34 +00:00 by Brouie · 5 comments
Brouie commented 2026-03-31 08:57:34 +00:00 (Migrated from gitlab.com)

clicking 'BRIDGE FROM SOLANA' on Solana Localnet->Anvil does nothing. no console output, no error message, no Phantom popup. Phantom shows 'This feature is not supported when Solana Localnet is enabled' in its own UI but the bridge frontend gets no feedback.

the button should either show an error toast/banner when the wallet rejects, or detect localnet and warn the user upfront that Phantom doesn't support localnet signing.

this blocks all manual Solana E2E testing through the UI (#67). only automated e2e tests on the server can test Solana paths currently.

commit 74b5f3e, laptop Vite workflow, Phantom wallet.

clicking 'BRIDGE FROM SOLANA' on Solana Localnet->Anvil does nothing. no console output, no error message, no Phantom popup. Phantom shows 'This feature is not supported when Solana Localnet is enabled' in its own UI but the bridge frontend gets no feedback. the button should either show an error toast/banner when the wallet rejects, or detect localnet and warn the user upfront that Phantom doesn't support localnet signing. this blocks all manual Solana E2E testing through the UI (#67). only automated e2e tests on the server can test Solana paths currently. commit 74b5f3e, laptop Vite workflow, Phantom wallet.
PlasticDigits commented 2026-04-01 01:38:18 +00:00 (Migrated from gitlab.com)

@Brouie I strongly dislike toasts but there should be an error box below the button when theres an issue

@Brouie I strongly dislike toasts but there should be an error box below the button when theres an issue
PlasticDigits commented 2026-04-01 01:55:08 +00:00 (Migrated from gitlab.com)

mentioned in commit dd7e830b7d

mentioned in commit dd7e830b7dfc859d70e2a19663b0b9b3e8c298a4
PlasticDigits commented 2026-04-01 01:55:15 +00:00 (Migrated from gitlab.com)

Implemented fix in feat/solana-integration (commit dd7e830):

  • Upfront: amber notice on the transfer form when source is Solana Localnet and the connected wallet is Phantom (local-validator signing limitations).
  • Errors: formatSolanaWalletError normalizes non-Error wallet rejects (e.g. code 4001) and adds context when messages mention localnet / not supported.
  • Signing: sendSolanaTransaction now requires an active publicKey, wraps signTransaction in a 90s timeout (Phantom can hang instead of rejecting), and validates a signed tx before serialize.
  • Form wiring: useSolanaDeposit rethrows after recording state so TransferForm always sets the red error banner and calls resetSolana() (removes the fragile useEffect mirror).

@Brouie could you review when you have a chance?

Implemented fix in `feat/solana-integration` (commit dd7e830): - **Upfront:** amber notice on the transfer form when source is Solana Localnet and the connected wallet is Phantom (local-validator signing limitations). - **Errors:** `formatSolanaWalletError` normalizes non-`Error` wallet rejects (e.g. code 4001) and adds context when messages mention localnet / not supported. - **Signing:** `sendSolanaTransaction` now requires an active `publicKey`, wraps `signTransaction` in a 90s timeout (Phantom can hang instead of rejecting), and validates a signed tx before `serialize`. - **Form wiring:** `useSolanaDeposit` rethrows after recording state so `TransferForm` always sets the red error banner and calls `resetSolana()` (removes the fragile useEffect mirror). @Brouie could you review when you have a chance?
Brouie commented 2026-04-01 04:42:28 +00:00 (Migrated from gitlab.com)

verified -- amber warning shows for Phantom on Solana Localnet. Backpack wallet works for localnet E2E (Solana->Anvil 2.985 TKNA, 4/4 complete). commit dd7e830 confirmed.

verified -- amber warning shows for Phantom on Solana Localnet. Backpack wallet works for localnet E2E (Solana->Anvil 2.985 TKNA, 4/4 complete). commit dd7e830 confirmed.
Brouie (Migrated from gitlab.com) closed this issue 2026-04-01 04:42:45 +00:00
Brouie commented 2026-04-01 04:55:41 +00:00 (Migrated from gitlab.com)

mentioned in issue #96

mentioned in issue #96
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-bridge-monorepo#92
No description provided.