fix nano being sent to only the first output address in list

This commit is contained in:
fosse 2023-11-27 13:30:24 -05:00
parent 615d016dd5
commit 1236a3cfad

View file

@ -186,9 +186,9 @@ abstract class NanoWalletBase
final block = await _client.constructSendBlock( final block = await _client.constructSendBlock(
amountRaw: amt.toString(), amountRaw: amt.toString(),
destinationAddress: credentials.outputs.first.isParsedAddress destinationAddress: txOut.isParsedAddress
? credentials.outputs.first.extractedAddress! ? txOut.extractedAddress!
: credentials.outputs.first.address, : txOut.address,
privateKey: _privateKey!, privateKey: _privateKey!,
balanceAfterTx: runningBalance, balanceAfterTx: runningBalance,
previousHash: previousHash, previousHash: previousHash,