Skip to content

Commit

Permalink
failed payment: use amount from entry to revert
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwiidb committed Jun 30, 2023
1 parent 9e18911 commit 4b5b69b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/service/invoices.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func (svc *LndhubService) HandleFailedPayment(ctx context.Context, invoice *mode
InvoiceID: invoice.ID,
CreditAccountID: entryToRevert.DebitAccountID,
DebitAccountID: entryToRevert.CreditAccountID,
Amount: invoice.Amount,
Amount: entryToRevert.Amount,
}
_, err = tx.NewInsert().Model(&entry).Exec(ctx)
if err != nil {
Expand Down

0 comments on commit 4b5b69b

Please sign in to comment.