Skip to content

Send: Feature - Nonce assignment on signing for EVM and XRP#2123

Closed
leolambo wants to merge 13 commits intobitpay:developfrom
leolambo:jitNonceAssignmentEVM
Closed

Send: Feature - Nonce assignment on signing for EVM and XRP#2123
leolambo wants to merge 13 commits intobitpay:developfrom
leolambo:jitNonceAssignmentEVM

Conversation

@leolambo
Copy link
Copy Markdown
Contributor

@leolambo leolambo commented Apr 6, 2026

Description

RN-2649

EVM and XRP transaction proposals can now have their nonce deferred to signing time. When the app sees a txp with deferNonce set or a null nonce on a nonce-based chain, it calls prepareTx to get a fresh nonce from BWS right before signing. This prevents stale nonces on proposals that sit pending.

Also widens the multi-proposal signing filters so XRP txps go through the sequential path alongside EVM, since they both depend on ordered nonce assignment.

Depends on:

Changelog

  • Added IsNonceChain helper covering EVM + XRP chains
  • publishAndSign calls prepareTx before signing when nonce is missing on a nonce chain
  • Multi-proposal filters use IsNonceChain instead of just IsEVMChain so XRP txps are signed sequentially
  • deferNonce field added to TransactionProposal model

Testing Notes

With deferNonce disabled in runtime settings, behavior should be identical to before — nonces are assigned at creation time.

With deferNonce enabled:

  1. Create an EVM or XRP txp — should have null nonce and deferNonce: true
  2. Sign the txp — app should log prepareTx: BWS assigned nonce X to txp Y before signing
  3. Bulk sign multiple EVM/XRP txps — they should be processed sequentially with incrementing nonces

UTXO chains (BTC, BCH, etc.) are unaffected.

Gamboster and others added 10 commits March 30, 2026 18:02
SendTo: Fix - Email validation regex causing stack overflow
EnableTwoFactor: Fix - prevent unhandled rejected dangling otp toggle promise
Swap: Fix - use the adjusted min for swap min pill
Call prepareTx instead of assignNonce. Also check for null nonce
as a fallback so the app is ready for when BWS always defers nonce
assignment for EVM chains.
Add IsNonceChain helper that covers EVM + XRP and use it in the
prepareTx guard and multi-proposal signing filters so XRP txps
get the same sequential nonce handling as EVM.
@leolambo leolambo changed the title Nonce assignment on signing fo EVM and XRP Send: Feature - Nonce assignment on signing fo EVM and XRP Apr 6, 2026
@leolambo leolambo changed the title Send: Feature - Nonce assignment on signing fo EVM and XRP Send: Feature - Nonce assignment on signing for EVM and XRP Apr 6, 2026
@JohnathanWhite JohnathanWhite changed the base branch from master to develop April 7, 2026 13:23
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.

5 participants