Skip to content

Commit

Permalink
fix: when sending token, consider spendable balance zero as noteoungb…
Browse files Browse the repository at this point in the history
…alance

Signed-off-by: Stéphane Prohaszka <[email protected]>
  • Loading branch information
sprohaszka-ledger committed Jan 28, 2025
1 parent f79f7e5 commit 0bf45ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/coin-modules/coin-solana/src/prepareTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const deriveTokenTransferCommandDescriptor = async (

const { fee, spendable: spendableSol } = await estimateFeeAndSpendable(api, mainAccount, tx);

if (spendableSol.lt(assocAccRentExempt)) {
if (spendableSol.lt(assocAccRentExempt) || spendableSol.isZero()) {
errors.fee = new NotEnoughBalance();
}

Expand Down

0 comments on commit 0bf45ff

Please sign in to comment.