Return correct Amount and Fee on the payment responses

So far we have returned the total amount (which includes the fee) and the fee.
This information was taken from the payment route response now we directly return it from the invoice data.
This is consistent with the other transaction responses
This commit is contained in:
Michael Bumann
2024-03-01 22:07:09 +01:00
parent 23604060f7
commit 30eb3511ca
2 changed files with 4 additions and 4 deletions

View File

@@ -247,8 +247,8 @@ func (controller *KeySendController) SingleKeySend(ctx context.Context, reqBody
}
responseBody := &KeySendResponseBody{
Amount: sendPaymentResponse.PaymentRoute.TotalAmt,
Fee: sendPaymentResponse.PaymentRoute.TotalFees,
Amount: invoice.Amount,
Fee: invoice.Fee,
CustomRecords: customRecords,
Description: reqBody.Memo,
Destination: reqBody.Destination,

View File

@@ -129,8 +129,8 @@ func (controller *PayInvoiceController) PayInvoice(c echo.Context) error {
}
responseBody := &PayInvoiceResponseBody{
PaymentRequest: paymentRequest,
Amount: sendPaymentResponse.PaymentRoute.TotalAmt,
Fee: sendPaymentResponse.PaymentRoute.TotalFees,
Amount: invoice.Amount,
Fee: invoice.Fee,
Description: invoice.Memo,
DescriptionHash: invoice.DescriptionHash,
Destination: invoice.DestinationPubkeyHex,