lnd+rpc: update RPC responses to convert mSAT to SAT

This commit is contained in:
Olaoluwa Osuntokun
2017-08-21 23:25:41 -07:00
parent ad00266451
commit 01b0ddf1c5
9 changed files with 146 additions and 84 deletions

View File

@ -8,6 +8,7 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/roasbeef/btcd/chaincfg/chainhash"
"github.com/roasbeef/btcutil"
)
@ -63,7 +64,7 @@ func (i *invoiceRegistry) AddDebugInvoice(amt btcutil.Amount, preimage chainhash
invoice := &channeldb.Invoice{
CreationDate: time.Now(),
Terms: channeldb.ContractTerm{
Value: amt,
Value: lnwire.NewMSatFromSatoshis(amt),
PaymentPreimage: preimage,
},
}