Skip to content

feat(sdk-coin-sui): handle fab balance instruction#8920

Merged
abhishekagrawal080 merged 1 commit into
masterfrom
CSHLD-948
Jun 2, 2026
Merged

feat(sdk-coin-sui): handle fab balance instruction#8920
abhishekagrawal080 merged 1 commit into
masterfrom
CSHLD-948

Conversation

@abhishekagrawal080

@abhishekagrawal080 abhishekagrawal080 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

TICKET: CSHLD-948

BitGoJS/modules/sdk-coin-sui/src/lib/transferBuilder.ts

  1. Fixed _fundsInAddressBalance JSDoc — removed incorrect claim that Sui automatically combines address balance into the gas coin when payment is non-empty
  2. Updated buildSuiTransaction() JSDoc from "three paths" to "four paths", adding Path 2c description
  3. Added Path 2c logic: when self-pay AND gasData.payment.length > 0 AND fundsInAddressBalance > 0, explicitly calls redeem_funds(withdrawal(addrBal)) + MergeCoins(gas, [addrCoin]) before SplitCoins

BitGoJS/modules/sdk-coin-sui/test/unit/transactionBuilder/transferBuilder.ts
4. Updated the existing Path 2c test to assert the correct PTB structure: MoveCall → MergeCoins → SplitCoins → TransferObjects (was incorrectly asserting SplitCoins at command 0)

@abhishekagrawal080 abhishekagrawal080 requested a review from a team as a code owner June 2, 2026 14:18
@linear-code

linear-code Bot commented Jun 2, 2026

Copy link
Copy Markdown

CSHLD-948

@abhishekagrawal080 abhishekagrawal080 merged commit 49703c2 into master Jun 2, 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.

2 participants