invoicesrpc+lnrpc: add msat fields to invoices
This commit is contained in:
9 files changed
+660
-590
No files matched your search
@@ -11,7 +11,6 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"gopkg.in/macaroon-bakery.v2/bakery"
|
||||
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
@@ -261,10 +260,15 @@ func (s *Server) AddHoldInvoice(ctx context.Context,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
value, err := lnrpc.UnmarshallAmt(invoice.Value, invoice.ValueMsat)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
addInvoiceData := &AddInvoiceData{
|
||||
Memo: invoice.Memo,
|
||||
Hash: &hash,
|
||||
Value: btcutil.Amount(invoice.Value),
|
||||
Value: value,
|
||||
DescriptionHash: invoice.DescriptionHash,
|
||||
Expiry: invoice.Expiry,
|
||||
FallbackAddr: invoice.FallbackAddr,
|
||||
|
||||
Reference in new issue
Block a user