mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 19:39:22 +00:00
particl tweaks
This commit is contained in:
parent
76aca78dbb
commit
6d9be31e76
5 changed files with 5075 additions and 5099 deletions
|
@ -106,14 +106,7 @@ abstract class CoinServiceAPI {
|
||||||
throw UnimplementedError("moved");
|
throw UnimplementedError("moved");
|
||||||
|
|
||||||
case Coin.particl:
|
case Coin.particl:
|
||||||
return ParticlWallet(
|
throw UnimplementedError("moved");
|
||||||
walletId: walletId,
|
|
||||||
walletName: walletName,
|
|
||||||
coin: coin,
|
|
||||||
secureStore: secureStorageInterface,
|
|
||||||
client: client,
|
|
||||||
cachedClient: cachedClient,
|
|
||||||
tracker: tracker);
|
|
||||||
|
|
||||||
case Coin.stellar:
|
case Coin.stellar:
|
||||||
return StellarWallet(
|
return StellarWallet(
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -97,9 +97,10 @@ class Particl extends Bip39HDCurrency {
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
({coinlib.Address address, AddressType addressType}) getAddressForPublicKey(
|
({coinlib.Address address, AddressType addressType}) getAddressForPublicKey({
|
||||||
{required coinlib.ECPublicKey publicKey,
|
required coinlib.ECPublicKey publicKey,
|
||||||
required DerivePathType derivePathType}) {
|
required DerivePathType derivePathType,
|
||||||
|
}) {
|
||||||
switch (derivePathType) {
|
switch (derivePathType) {
|
||||||
case DerivePathType.bip44:
|
case DerivePathType.bip44:
|
||||||
final addr = coinlib.P2PKHAddress.fromPublicKey(
|
final addr = coinlib.P2PKHAddress.fromPublicKey(
|
||||||
|
@ -109,8 +110,6 @@ class Particl extends Bip39HDCurrency {
|
||||||
|
|
||||||
return (address: addr, addressType: AddressType.p2pkh);
|
return (address: addr, addressType: AddressType.p2pkh);
|
||||||
|
|
||||||
// case DerivePathType.bip49:
|
|
||||||
|
|
||||||
case DerivePathType.bip84:
|
case DerivePathType.bip84:
|
||||||
final addr = coinlib.P2WPKHAddress.fromPublicKey(
|
final addr = coinlib.P2WPKHAddress.fromPublicKey(
|
||||||
publicKey,
|
publicKey,
|
||||||
|
@ -146,10 +145,8 @@ class Particl extends Bip39HDCurrency {
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
// TODO: implement supportedDerivationPathTypes
|
|
||||||
List<DerivePathType> get supportedDerivationPathTypes => [
|
List<DerivePathType> get supportedDerivationPathTypes => [
|
||||||
DerivePathType.bip44,
|
DerivePathType.bip44,
|
||||||
// DerivePathType.bip49,
|
|
||||||
DerivePathType.bip84,
|
DerivePathType.bip84,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ class ParticlWallet extends Bip39HDWallet
|
||||||
Future<void> updateTransactions() async {
|
Future<void> updateTransactions() async {
|
||||||
final currentChainHeight = await fetchChainHeight();
|
final currentChainHeight = await fetchChainHeight();
|
||||||
|
|
||||||
// TODO: [prio=low] switch to V2 transactions.
|
// TODO: [prio=high] switch to V2 transactions.
|
||||||
final data = await fetchTransactionsV1(
|
final data = await fetchTransactionsV1(
|
||||||
addresses: await fetchAddressesForElectrumXScan(),
|
addresses: await fetchAddressesForElectrumXScan(),
|
||||||
currentChainHeight: currentChainHeight,
|
currentChainHeight: currentChainHeight,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue