Skip to content

fix(sdk-coin-flrp): update fromAddresses in delegator tx#8179

Merged
joshisakshi merged 1 commit intomasterfrom
SC-5648
Feb 24, 2026
Merged

fix(sdk-coin-flrp): update fromAddresses in delegator tx#8179
joshisakshi merged 1 commit intomasterfrom
SC-5648

Conversation

@joshisakshi
Copy link
Contributor

@joshisakshi joshisakshi commented Feb 19, 2026

TICKET: SC-5648

Summary:

  • Change fromAddressesBytes from [userAddress] to sorted _fromAddresses

  • Sort fromAddressesBytes before passing to FlareJS to match sorted UTXO addresses

  • Fixes 'No addresses match UTXO owners' error in HSM firmware tests

  • Clarify comments about reward distribution (determined by stake output addresses, not rewardAddresses parameter)"

  • Change output threshold

    • Issue: FlareJS defaults change outputs to threshold=1 for multisig wallets
    • Impact: Any single compromised key could steal change funds
    • Fix: Apply threshold correction (same pattern as ExportInPTxBuilder)
  • Add comprehensive test coverage (33 tests)

    • Core validation (nodeID, amount, duration, required fields)
    • BitGo multisig patterns (2-of-3, 2-of-2)
    • Multiple UTXOs, change outputs, round-trip serialization
    • Real-world scenarios (multiple/sequential delegations)

@joshisakshi joshisakshi changed the title fix(sdk-coin-flrp): update fromAddresses to match UTXO owners in dele… fix(sdk-coin-flrp): update fromAddresses in delegator tx Feb 19, 2026
Copy link
Contributor

@ashutoshkumar-6 ashutoshkumar-6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…gation tx

TICKET: SC-5648

- Change fromAddressesBytes from [userAddress] to sorted _fromAddresses
- Sort fromAddressesBytes to match sorted UTXO addresses
- Fixes 'No addresses match UTXO owners' error in HSM firmware tests
- Clarify comments about reward distribution
- Fix output threshold for multisig wallets (apply threshold correction)
- Add comprehensive test coverage
- Document key convention for delegation tx
Copy link
Contributor

@ashutoshkumar-6 ashutoshkumar-6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joshisakshi joshisakshi marked this pull request as ready for review February 24, 2026 12:11
@joshisakshi joshisakshi requested a review from a team as a code owner February 24, 2026 12:11
@joshisakshi joshisakshi merged commit fa01566 into master Feb 24, 2026
22 checks passed
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.

3 participants