no need to fetch address if it already exists

This commit is contained in:
julian 2023-10-27 11:16:25 -06:00
parent c0389d2da7
commit 86c33d4cb5

View file

@ -2668,6 +2668,7 @@ class BitcoinCashWallet extends CoinServiceAPI
try {
// Populating the addresses to check
for (var i = 0; i < utxosToUse.length; i++) {
if (utxosToUse[i].address == null) {
final txid = utxosToUse[i].txid;
final tx = await _cachedElectrumXClient.getTransaction(
txHash: txid,
@ -2692,6 +2693,7 @@ class BitcoinCashWallet extends CoinServiceAPI
utxosToUse[i] = utxosToUse[i].copyWith(address: address);
}
}
}
final derivePathType = addressType(address: utxosToUse[i].address!);