mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 20:09:23 +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"];
|
final n = output["n"];
|
||||||
if (n != null && n == utxosToUse[i].vout) {
|
if (n != null && n == utxosToUse[i].vout) {
|
||||||
String address = output["scriptPubKey"]["addresses"][0] as String;
|
String address = output["scriptPubKey"]["addresses"][0] as String;
|
||||||
if (bitbox.Address.detectFormat(address) ==
|
if (bitbox.Address.detectFormat(address) !=
|
||||||
bitbox.Address.formatCashAddr) {
|
bitbox.Address.formatCashAddr) {
|
||||||
if (validateCashAddr(address)) {
|
try {
|
||||||
address = bitbox.Address.toLegacyAddress(address);
|
address = bitbox.Address.toCashAddress(address);
|
||||||
} else {
|
} catch (_) {
|
||||||
throw Exception(
|
rethrow;
|
||||||
"Unsupported address found during fetchBuildTxData(): $address");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!addressTxid.containsKey(address)) {
|
if (!addressTxid.containsKey(address)) {
|
||||||
|
|
Loading…
Reference in a new issue