From d742529bb22cc477ba3512f9ff217517e334d726 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Thu, 6 Sep 2018 08:39:09 +0200 Subject: [PATCH] rpcserver: set AmtPaidMsat when creating RPC invoice --- rpcserver.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rpcserver.go b/rpcserver.go index 29b1b3ac..4b085af0 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -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 }