Merge pull request #1846 from roeierez/invoice_amt_paid

rpcserver: amount paid should be in satoshis as other fields used for amount
This commit is contained in:
Johan T. Halseth 2018-09-05 12:58:59 +02:00 committed by GitHub
commit baee07ef48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2766,6 +2766,7 @@ func createRPCInvoice(invoice *channeldb.Invoice) (*lnrpc.Invoice, error) {
preimage := invoice.Terms.PaymentPreimage
satAmt := invoice.Terms.Value.ToSatoshis()
amtPaid := invoice.AmtPaid.ToSatoshis()
return &lnrpc.Invoice{
Memo: string(invoice.Memo[:]),
@ -2784,7 +2785,7 @@ func createRPCInvoice(invoice *channeldb.Invoice) (*lnrpc.Invoice, error) {
RouteHints: routeHints,
AddIndex: invoice.AddIndex,
SettleIndex: invoice.SettleIndex,
AmtPaid: int64(invoice.AmtPaid),
AmtPaid: int64(amtPaid),
}, nil
}