mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
bch fetch derivation by address fix
This commit is contained in:
parent
266a433aa3
commit
68be62e3ef
1 changed files with 5 additions and 6 deletions
|
@ -2601,13 +2601,12 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
final n = output["n"];
|
||||
if (n != null && n == utxosToUse[i].vout) {
|
||||
String address = output["scriptPubKey"]["addresses"][0] as String;
|
||||
if (bitbox.Address.detectFormat(address) ==
|
||||
if (bitbox.Address.detectFormat(address) !=
|
||||
bitbox.Address.formatCashAddr) {
|
||||
if (validateCashAddr(address)) {
|
||||
address = bitbox.Address.toLegacyAddress(address);
|
||||
} else {
|
||||
throw Exception(
|
||||
"Unsupported address found during fetchBuildTxData(): $address");
|
||||
try {
|
||||
address = bitbox.Address.toCashAddress(address);
|
||||
} catch (_) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
if (!addressTxid.containsKey(address)) {
|
||||
|
|
Loading…
Reference in a new issue