mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 10:34:32 +00:00
add tor support bool to CryptoCurrency and override in coin impls
This commit is contained in:
parent
70a0232de9
commit
3218216caa
10 changed files with 30 additions and 0 deletions
|
@ -25,6 +25,9 @@ class Bitcoin extends Bip39HDCurrency with PaynymCurrencyInterface {
|
|||
// change this to change the number of confirms a tx needs in order to show as confirmed
|
||||
int get minConfirms => 1;
|
||||
|
||||
@override
|
||||
bool get torSupport => true;
|
||||
|
||||
@override
|
||||
List<DerivePathType> get supportedDerivationPathTypes => [
|
||||
DerivePathType.bip44,
|
||||
|
|
|
@ -23,6 +23,9 @@ class BitcoinFrost extends FrostCurrency {
|
|||
@override
|
||||
int get minConfirms => 1;
|
||||
|
||||
@override
|
||||
bool get torSupport => true;
|
||||
|
||||
@override
|
||||
NodeModel get defaultNode {
|
||||
switch (network) {
|
||||
|
|
|
@ -34,6 +34,9 @@ class Bitcoincash extends Bip39HDCurrency {
|
|||
// change this to change the number of confirms a tx needs in order to show as confirmed
|
||||
int get minConfirms => 0; // bch zeroconf
|
||||
|
||||
@override
|
||||
bool get torSupport => true;
|
||||
|
||||
@override
|
||||
List<DerivePathType> get supportedDerivationPathTypes => [
|
||||
DerivePathType.bip44,
|
||||
|
|
|
@ -20,6 +20,9 @@ class Dogecoin extends Bip39HDCurrency {
|
|||
}
|
||||
}
|
||||
|
||||
@override
|
||||
bool get torSupport => true;
|
||||
|
||||
@override
|
||||
List<DerivePathType> get supportedDerivationPathTypes => [
|
||||
DerivePathType.bip44,
|
||||
|
|
|
@ -32,6 +32,9 @@ class Ecash extends Bip39HDCurrency {
|
|||
// change this to change the number of confirms a tx needs in order to show as confirmed
|
||||
int get minConfirms => 0; // bch zeroconf
|
||||
|
||||
@override
|
||||
bool get torSupport => true;
|
||||
|
||||
@override
|
||||
List<DerivePathType> get supportedDerivationPathTypes => [
|
||||
DerivePathType.eCash44,
|
||||
|
|
|
@ -24,6 +24,9 @@ class Firo extends Bip39HDCurrency {
|
|||
@override
|
||||
int get minConfirms => 1;
|
||||
|
||||
@override
|
||||
bool get torSupport => true;
|
||||
|
||||
@override
|
||||
List<DerivePathType> get supportedDerivationPathTypes => [
|
||||
DerivePathType.bip44,
|
||||
|
|
|
@ -24,6 +24,9 @@ class Litecoin extends Bip39HDCurrency {
|
|||
// change this to change the number of confirms a tx needs in order to show as confirmed
|
||||
int get minConfirms => 1;
|
||||
|
||||
@override
|
||||
bool get torSupport => true;
|
||||
|
||||
@override
|
||||
List<DerivePathType> get supportedDerivationPathTypes => [
|
||||
DerivePathType.bip44,
|
||||
|
|
|
@ -22,6 +22,9 @@ class Namecoin extends Bip39HDCurrency {
|
|||
// See https://github.com/cypherstack/stack_wallet/blob/621aff47969761014e0a6c4e699cb637d5687ab3/lib/services/coins/namecoin/namecoin_wallet.dart#L58
|
||||
int get minConfirms => 2;
|
||||
|
||||
@override
|
||||
bool get torSupport => true;
|
||||
|
||||
@override
|
||||
// See https://github.com/cypherstack/stack_wallet/blob/621aff47969761014e0a6c4e699cb637d5687ab3/lib/services/coins/namecoin/namecoin_wallet.dart#L80
|
||||
String constructDerivePath({
|
||||
|
|
|
@ -22,6 +22,9 @@ class Particl extends Bip39HDCurrency {
|
|||
// See https://github.com/cypherstack/stack_wallet/blob/d08b5c9b22b58db800ad07b2ceeb44c6d05f9cf3/lib/services/coins/particl/particl_wallet.dart#L57
|
||||
int get minConfirms => 1;
|
||||
|
||||
@override
|
||||
bool get torSupport => true;
|
||||
|
||||
@override
|
||||
// See https://github.com/cypherstack/stack_wallet/blob/d08b5c9b22b58db800ad07b2ceeb44c6d05f9cf3/lib/services/coins/particl/particl_wallet.dart#L68
|
||||
String constructDerivePath(
|
||||
|
|
|
@ -20,6 +20,9 @@ abstract class CryptoCurrency {
|
|||
// (used for eth currently)
|
||||
bool get hasTokenSupport => false;
|
||||
|
||||
// Override in subclass if the currency has Tor support:
|
||||
bool get torSupport => false;
|
||||
|
||||
// TODO: [prio=low] require these be overridden in concrete implementations to remove reliance on [coin]
|
||||
int get fractionDigits => coin.decimals;
|
||||
BigInt get satsPerCoin => Constants.satsPerCoin(coin);
|
||||
|
|
Loading…
Reference in a new issue