mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-09 04:09:25 +00:00
add genesis hash getters
This commit is contained in:
parent
455a45eb50
commit
249a883681
3 changed files with 20 additions and 0 deletions
|
@ -18,6 +18,18 @@ class Bitcoin extends Bip39HDCurrency {
|
|||
}
|
||||
}
|
||||
|
||||
@override
|
||||
String get genesisHash {
|
||||
switch (network) {
|
||||
case CryptoCurrencyNetwork.main:
|
||||
return "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f";
|
||||
case CryptoCurrencyNetwork.test:
|
||||
return "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943";
|
||||
default:
|
||||
throw Exception("Unsupported network: $network");
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Amount get dustLimit => Amount(
|
||||
rawValue: BigInt.from(294),
|
||||
|
|
|
@ -13,6 +13,11 @@ class Epiccash extends Bip39Currency {
|
|||
}
|
||||
}
|
||||
|
||||
@override
|
||||
String get genesisHash {
|
||||
return "not used in epiccash";
|
||||
}
|
||||
|
||||
@override
|
||||
// change this to change the number of confirms a tx needs in order to show as confirmed
|
||||
int get minConfirms => 3;
|
||||
|
|
|
@ -21,5 +21,8 @@ abstract class CryptoCurrency {
|
|||
|
||||
int get minConfirms;
|
||||
|
||||
// TODO: [prio=low] could be handled differently as (at least) epiccash does not use this
|
||||
String get genesisHash;
|
||||
|
||||
bool validateAddress(String address);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue