fix address book parsing

This commit is contained in:
Serhii 2023-08-25 14:38:47 +03:00
parent 7c9ebe7a99
commit 87b87ded0d

View file

@ -120,7 +120,9 @@ abstract class BitcoinCashWalletBase extends ElectrumWallet with Store {
// Calculate the amount to send and change // Calculate the amount to send and change
final sendAmount = transactionCredentials.outputs[0].formattedCryptoAmount!; final sendAmount = transactionCredentials.outputs[0].formattedCryptoAmount!;
final outputAddress = transactionCredentials.outputs[0].address; final outputAddress = transactionCredentials.outputs[0].isParsedAddress
? transactionCredentials.outputs[0].extractedAddress
: transactionCredentials.outputs[0].address;
final fee = bitbox.BitcoinCash.getByteCount(utxosToUse.length, 2); final fee = bitbox.BitcoinCash.getByteCount(utxosToUse.length, 2);
final changeAmount = totalBalance - sendAmount - fee; final changeAmount = totalBalance - sendAmount - fee;