mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 01:37:54 +00:00
disable wrapped segwit p2sh for btc
This commit is contained in:
parent
fe0f816546
commit
4232ef8d8a
1 changed files with 24 additions and 24 deletions
|
@ -27,7 +27,7 @@ class Bitcoin extends Bip39HDCurrency {
|
||||||
@override
|
@override
|
||||||
List<DerivePathType> get supportedDerivationPathTypes => [
|
List<DerivePathType> get supportedDerivationPathTypes => [
|
||||||
DerivePathType.bip44,
|
DerivePathType.bip44,
|
||||||
DerivePathType.bip49,
|
// DerivePathType.bip49,
|
||||||
DerivePathType.bip84,
|
DerivePathType.bip84,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -107,9 +107,9 @@ class Bitcoin extends Bip39HDCurrency {
|
||||||
case DerivePathType.bip44:
|
case DerivePathType.bip44:
|
||||||
purpose = 44;
|
purpose = 44;
|
||||||
break;
|
break;
|
||||||
case DerivePathType.bip49:
|
// case DerivePathType.bip49:
|
||||||
purpose = 49;
|
// purpose = 49;
|
||||||
break;
|
// break;
|
||||||
case DerivePathType.bip84:
|
case DerivePathType.bip84:
|
||||||
purpose = 84;
|
purpose = 84;
|
||||||
break;
|
break;
|
||||||
|
@ -134,26 +134,26 @@ class Bitcoin extends Bip39HDCurrency {
|
||||||
|
|
||||||
return (address: addr, addressType: AddressType.p2pkh);
|
return (address: addr, addressType: AddressType.p2pkh);
|
||||||
|
|
||||||
case DerivePathType.bip49:
|
// case DerivePathType.bip49:
|
||||||
// addressString = P2SH(
|
// // addressString = P2SH(
|
||||||
// data: PaymentData(
|
// // data: PaymentData(
|
||||||
// redeem: P2WPKH(data: data, network: _network).data),
|
// // redeem: P2WPKH(data: data, network: _network).data),
|
||||||
// network: _network)
|
// // network: _network)
|
||||||
// .data
|
// // .data
|
||||||
// .address!;
|
// // .address!;
|
||||||
|
//
|
||||||
// todo ?????????????????? Does not match with current BTC
|
// // todo ?????????????????? Does not match with current BTC
|
||||||
final adr = coinlib.P2WPKHAddress.fromPublicKey(
|
// final adr = coinlib.P2WPKHAddress.fromPublicKey(
|
||||||
publicKey,
|
// publicKey,
|
||||||
hrp: networkParams.bech32Hrp,
|
// hrp: networkParams.bech32Hrp,
|
||||||
);
|
// );
|
||||||
final addr = coinlib.P2SHAddress.fromHash(
|
// final addr = coinlib.P2SHAddress.fromHash(
|
||||||
adr.program.pkHash,
|
// adr.program.pkHash,
|
||||||
version: networkParams.p2shPrefix,
|
// version: networkParams.p2shPrefix,
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
// TODO ??????????????
|
// // TODO ??????????????
|
||||||
return (address: addr, addressType: AddressType.p2sh);
|
// return (address: addr, addressType: AddressType.p2sh);
|
||||||
|
|
||||||
case DerivePathType.bip84:
|
case DerivePathType.bip84:
|
||||||
final addr = coinlib.P2WPKHAddress.fromPublicKey(
|
final addr = coinlib.P2WPKHAddress.fromPublicKey(
|
||||||
|
|
Loading…
Reference in a new issue