From f0201fbb328f8ddbf141f7b59839dc3fc3debdec Mon Sep 17 00:00:00 2001 From: Roei Erez Date: Wed, 5 Sep 2018 11:41:48 +0300 Subject: [PATCH] amount paid should be in satoshies as other fields used for amount --- rpcserver.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpcserver.go b/rpcserver.go index 20e8938c..29b1b3ac 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -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 }