Skip to content

feat: add custodialWalletMode to tx senders (Fireblocks)#2172

Open
drift-internal-ai-bot[bot] wants to merge 1 commit intomasterfrom
feat/custodial-wallet-mode
Open

feat: add custodialWalletMode to tx senders (Fireblocks)#2172
drift-internal-ai-bot[bot] wants to merge 1 commit intomasterfrom
feat/custodial-wallet-mode

Conversation

@drift-internal-ai-bot
Copy link
Copy Markdown

Summary

  • Adds custodialWalletMode option to BaseTxSender, WhileValidTxSender, RetryTxSender, and ForwardOnlyTxSender
  • When enabled: timeout extends from 35s to 3 minutes, throwOnTimeoutError defaults to false
  • Supports custodial wallets like Fireblocks that use durable nonces and have longer signing/approval flows

Context

Fireblocks replaces recentBlockhash with durable nonces and their signing flow (multi-sig, policy checks) can take minutes. The current 35s timeout causes false failures for these users. This mode is activated by the UI when a Fireblocks wallet is detected via WalletConnect.

Relates to BE-256

Test plan

  • Verify default behavior unchanged when custodialWalletMode is false/omitted
  • Verify timeout extends to 180s when custodialWalletMode is true
  • Verify throwOnTimeoutError defaults to false in custodial mode
  • TypeScript compilation passes

Custodial wallets like Fireblocks use durable nonces and have longer
signing flows. The default 35s timeout is too aggressive for these
wallets. This adds a custodialWalletMode option that:
- Extends timeout from 35s to 3 minutes
- Disables throwOnTimeoutError by default (tx may still land)

Applied to BaseTxSender, WhileValidTxSender, RetryTxSender, and
ForwardOnlyTxSender.

Co-Authored-By: Claude Opus 4.6 <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.

0 participants