Skip to content

Commit

Permalink
Merge pull request #232 from cashubtc/fix_nwc_allowance_fee
Browse files Browse the repository at this point in the history
fix: correct subtraction from allowance respects fees
  • Loading branch information
callebtc authored Dec 26, 2024
2 parents e70c5b1 + ca6ebbe commit 617a746
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/stores/nwc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ export const useNWCStore = defineStore("nwc", {
const meltData = await walletStore.meltInvoiceData();
const paidAmount =
walletStore.payInvoiceData.meltQuote.response.amount +
walletStore.payInvoiceData.meltQuote.response.fee_reserve -
proofsStore.sumProofs(meltData.change);
this.connections[0].allowanceLeft -= paidAmount;
return {
Expand Down

0 comments on commit 617a746

Please sign in to comment.