From c8a9ec0d6d8e27eb58f300db4728f79d232e78f6 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:29:34 +0200 Subject: [PATCH] fix: correct subtraction from allowance respects fees --- src/stores/nwc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/nwc.ts b/src/stores/nwc.ts index 137a3178..a76bbff7 100644 --- a/src/stores/nwc.ts +++ b/src/stores/nwc.ts @@ -127,7 +127,7 @@ export const useNWCStore = defineStore("nwc", { } try { const meltData = await walletStore.melt() - const paidAmount = walletStore.payInvoiceData.meltQuote.response.amount + proofsStore.sumProofs(meltData.change); + const paidAmount = walletStore.payInvoiceData.meltQuote.response.amount + walletStore.payInvoiceData.meltQuote.response.fee_reserve - proofsStore.sumProofs(meltData.change); this.connections[0].allowanceLeft -= paidAmount; return { result_type: nwcCommand.method,