mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
lndclient: fix Value/ValueMsat conversion problem
This commit is contained in:
parent
bb4dbc6207
commit
fc44ee8785
4 changed files with 4 additions and 6 deletions
|
|
@ -134,7 +134,7 @@ func (s *invoicesClient) AddHoldInvoice(ctx context.Context,
|
|||
rpcIn := &invoicesrpc.AddHoldInvoiceRequest{
|
||||
Memo: in.Memo,
|
||||
Hash: in.Hash[:],
|
||||
Value: int64(in.Value),
|
||||
ValueMsat: int64(in.Value),
|
||||
Expiry: in.Expiry,
|
||||
CltvExpiry: in.CltvExpiry,
|
||||
Private: true,
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ func (s *lightningClient) AddInvoice(ctx context.Context,
|
|||
|
||||
rpcIn := &lnrpc.Invoice{
|
||||
Memo: in.Memo,
|
||||
Value: int64(in.Value),
|
||||
ValueMsat: int64(in.Value),
|
||||
Expiry: in.Expiry,
|
||||
CltvExpiry: in.CltvExpiry,
|
||||
Private: true,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import (
|
|||
"github.com/lightninglabs/loop/lndclient"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/zpay32"
|
||||
)
|
||||
|
||||
|
|
@ -77,7 +76,7 @@ func (s *mockInvoices) AddHoldInvoice(ctx context.Context,
|
|||
s.lnd.ChainParams, *hash, creationDate,
|
||||
zpay32.Description(in.Memo),
|
||||
zpay32.CLTVExpiry(in.CltvExpiry),
|
||||
zpay32.Amount(lnwire.MilliSatoshi(in.Value)),
|
||||
zpay32.Amount(in.Value),
|
||||
)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import (
|
|||
"github.com/lightninglabs/loop/lndclient"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/zpay32"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
|
@ -88,7 +87,7 @@ func (h *mockLightningClient) AddInvoice(ctx context.Context,
|
|||
h.lnd.ChainParams, hash, creationDate,
|
||||
zpay32.Description(in.Memo),
|
||||
zpay32.CLTVExpiry(in.CltvExpiry),
|
||||
zpay32.Amount(lnwire.MilliSatoshi(in.Value)),
|
||||
zpay32.Amount(in.Value),
|
||||
)
|
||||
if err != nil {
|
||||
return lntypes.Hash{}, "", err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue