rpcserver: set AmtPaidMsat when creating RPC invoice

This commit is contained in:
Johan T. Halseth 2018-09-06 08:39:09 +02:00
parent 90a9f5882a
commit d742529bb2
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

View File

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