Skip to content

fix: resolve 7 Solana handler bugs#37

Merged
BitHighlander merged 3 commits intodevelopfrom
bugfix/solana-handler-fixes
Apr 5, 2026
Merged

fix: resolve 7 Solana handler bugs#37
BitHighlander merged 3 commits intodevelopfrom
bugfix/solana-handler-fixes

Conversation

@BitHighlander
Copy link
Copy Markdown
Collaborator

Summary

  • State management: export resetSolanaState() to clear cached address when device swaps
  • RPC failover: add fallback Solana RPCs with health check instead of single hardcoded URL
  • API key: throw on missing key instead of sending empty Bearer token
  • Base64 decode: proper error handling for malformed vault responses
  • Timeouts: 30s timeout on all vault REST calls and Solana RPC broadcast
  • Response validation: stricter check on sign-transaction response fields
  • Explorer link: include networkId in transaction_complete message

Test plan

  • Sign a Solana transaction, verify 30s timeout doesn't interfere with normal signing
  • Disconnect device, reconnect, verify address updates (not stale cache)
  • Sign message with vault not running, verify clear error about API key
  • Broadcast transaction, verify explorer link works in popup

🤖 Generated with Claude Code

BitHighlander and others added 3 commits April 3, 2026 16:03
…or handling

- Bug 5: export resetSolanaState() to clear cached address on device swap
- Bug 9: add RPC failover with health check instead of hardcoded URL
- Bug 11: getApiKey() throws on missing key instead of returning empty string
- Bug 12: fromBase64() wraps atob in try/catch for malformed input
- Bug 13: transaction_complete message includes networkId field
- Bug 14: all REST/RPC calls have 30s timeout via AbortSignal
- Bug 15: stricter validation of vault sign-transaction response

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Cache healthy Solana RPC URL for 60s to avoid health check on every
  broadcast (was adding 3+ seconds latency per transaction)
- Replace unreliable Alchemy demo key with Helius public endpoint
- Import and call resetSolanaState() in onStart before wallet.init()
  so cached Solana address is cleared on device reconnect/swap

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When vault polling transitions from connected (state 2/5) to errored (4),
clear the cached Solana address. Prevents a hot-swapped device from
signing against the previous device's cached address since Solana
derivation differs per-device seed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BitHighlander BitHighlander merged commit 6e51dea into develop Apr 5, 2026
3 of 4 checks passed
BitHighlander added a commit that referenced this pull request Apr 5, 2026
Ships 5 merged bug-fix PRs: vault messaging (#34), content-ui bar
removal (#33), balance forceRefresh dedup (#36), 8 EVM handler fixes
(#35), 7 Solana handler fixes (#37).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant