Summary
sendSwapTransaction / sendSwapOperation guard on allowance issues but not on issues.balance or simulationIncomplete, so doomed swaps can still be broadcast.
Expected behavior
If the Swaps API returns balance issues or simulationIncomplete: true, the SDK should refuse to call sendTransaction (same fail-closed posture as the allowance guard).
Repro
- Obtain a swap quote where
issues.balance.currentBalance < requiredBalance (or simulationIncomplete: true) but allowance is OK.
- Call
sendSwapTransaction(client, { address, swapQuote }) or swapQuote.execute().
- Observe transaction broadcast instead of a thrown error.
Suggested fix
Mirror the existing allowance check for balance and simulationIncomplete before broadcast.
Context
Official TS examples validate issues manually before execute; the execute path does not enforce.
Summary
sendSwapTransaction/sendSwapOperationguard on allowance issues but not onissues.balanceorsimulationIncomplete, so doomed swaps can still be broadcast.Expected behavior
If the Swaps API returns balance issues or
simulationIncomplete: true, the SDK should refuse to callsendTransaction(same fail-closed posture as the allowance guard).Repro
issues.balance.currentBalance < requiredBalance(orsimulationIncomplete: true) but allowance is OK.sendSwapTransaction(client, { address, swapQuote })orswapQuote.execute().Suggested fix
Mirror the existing allowance check for balance and simulationIncomplete before broadcast.
Context
Official TS examples validate
issuesmanually before execute; the execute path does not enforce.