Skip to content

Commit

Permalink
fix: correct subtraction from allowance respects fees
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Sep 3, 2024
1 parent 6edac72 commit c8a9ec0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stores/nwc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c8a9ec0

Please sign in to comment.