mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-03 10:46:42 +01:00
Fix lnd OutputDetails for outputs that dont have an address (#4438)
This commit is contained in:
parent
135b9f8a35
commit
678612161b
3 changed files with 3 additions and 3 deletions
|
@ -43,7 +43,7 @@ case class ChannelBalances(
|
|||
) extends LndModel
|
||||
|
||||
case class OutputDetails(
|
||||
address: BitcoinAddress,
|
||||
addressOpt: Option[BitcoinAddress],
|
||||
spk: ScriptPubKey,
|
||||
outputIndex: Long,
|
||||
amount: CurrencyUnit,
|
||||
|
|
|
@ -197,7 +197,7 @@ class LndRpcClientPairTest extends DualLndFixture {
|
|||
|
||||
assert(details.tx == tx)
|
||||
assert(details.txId == tx.txIdBE)
|
||||
assert(details.outputDetails.map(_.address).contains(addr))
|
||||
assert(details.outputDetails.flatMap(_.addressOpt).contains(addr))
|
||||
assert(details.amount == sendAmt)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ trait LndUtils {
|
|||
implicit def lndOutputDetailToOutputDetails(
|
||||
detail: lnrpc.OutputDetail): OutputDetails = {
|
||||
OutputDetails(
|
||||
address = BitcoinAddress.fromString(detail.address),
|
||||
addressOpt = BitcoinAddress.fromStringOpt(detail.address),
|
||||
spk = ScriptPubKey.fromAsmHex(detail.pkScript),
|
||||
outputIndex = detail.outputIndex,
|
||||
amount = Satoshis(detail.amount),
|
||||
|
|
Loading…
Add table
Reference in a new issue