From 0d1425f52539fdae0920ffb46979461a496bbc4b Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Sun, 1 Sep 2024 18:17:24 +0200 Subject: [PATCH] check for amount --- src/stores/wallet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/wallet.ts b/src/stores/wallet.ts index 82d58182..fa4bed0b 100644 --- a/src/stores/wallet.ts +++ b/src/stores/wallet.ts @@ -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; }