mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-11 05:04:35 +00:00
only use the PaymentData 'data' once and do not generate p2sh data using p2wpkh unless required
This commit is contained in:
parent
e271341738
commit
e115ff1b41
1 changed files with 6 additions and 4 deletions
|
@ -1430,9 +1430,6 @@ class BitcoinCashWallet extends CoinServiceAPI {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
final data = PaymentData(pubkey: node.publicKey);
|
final data = PaymentData(pubkey: node.publicKey);
|
||||||
final p2shData =
|
|
||||||
PaymentData(redeem: P2WPKH(data: data, network: _network).data);
|
|
||||||
|
|
||||||
String address;
|
String address;
|
||||||
isar_models.AddressType addrType;
|
isar_models.AddressType addrType;
|
||||||
|
|
||||||
|
@ -1442,7 +1439,12 @@ class BitcoinCashWallet extends CoinServiceAPI {
|
||||||
addrType = isar_models.AddressType.p2pkh;
|
addrType = isar_models.AddressType.p2pkh;
|
||||||
break;
|
break;
|
||||||
case DerivePathType.bip49:
|
case DerivePathType.bip49:
|
||||||
address = P2SH(data: p2shData, network: _network).data.address!;
|
address = P2SH(
|
||||||
|
data: PaymentData(
|
||||||
|
redeem: P2WPKH(data: data, network: _network).data),
|
||||||
|
network: _network)
|
||||||
|
.data
|
||||||
|
.address!;
|
||||||
addrType = isar_models.AddressType.p2sh;
|
addrType = isar_models.AddressType.p2sh;
|
||||||
break;
|
break;
|
||||||
// default:
|
// default:
|
||||||
|
|
Loading…
Reference in a new issue