Skip to content

Commit

Permalink
check for amount
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Sep 1, 2024
1 parent b485baa commit 0d1425f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stores/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export const useWalletStore = defineStore("wallet", {

// override: if there are proofs with a base64 id, use them
const base64Proofs = this.coinSelectSpendBase64(proofs, amount);
if (base64Proofs.length > 0) {
if (base64Proofs.length > 0 && base64Proofs.reduce((s, t) => (s += t.amount), 0) >= amount) {
return base64Proofs;
}

Expand Down

0 comments on commit 0d1425f

Please sign in to comment.