mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
REmove testnet
This commit is contained in:
parent
b60e2783d6
commit
9baa30c1a4
12 changed files with 3 additions and 75 deletions
|
@ -61,7 +61,6 @@ class _SendFromViewState extends ConsumerState<SendFromView> {
|
|||
case Coin.bitcoincashTestnet:
|
||||
case Coin.dogecoinTestNet:
|
||||
case Coin.firoTestNet:
|
||||
case Coin.particlTestNet:
|
||||
return amount.toStringAsFixed(Constants.decimalPlaces);
|
||||
case Coin.monero:
|
||||
return amount.toStringAsFixed(Constants.decimalPlacesMonero);
|
||||
|
|
|
@ -123,7 +123,6 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
|
|||
case Coin.bitcoincashTestnet:
|
||||
case Coin.firoTestNet:
|
||||
case Coin.dogecoinTestNet:
|
||||
case Coin.particlTestNet:
|
||||
final client = ElectrumX(
|
||||
host: formData.host!,
|
||||
port: formData.port!,
|
||||
|
@ -540,7 +539,6 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
|||
case Coin.bitcoincashTestnet:
|
||||
case Coin.firoTestNet:
|
||||
case Coin.dogecoinTestNet:
|
||||
case Coin.particlTestNet:
|
||||
return false;
|
||||
|
||||
case Coin.epicCash:
|
||||
|
|
|
@ -156,15 +156,6 @@ abstract class CoinServiceAPI {
|
|||
cachedClient: cachedClient,
|
||||
tracker: tracker);
|
||||
|
||||
case Coin.particlTestNet:
|
||||
return ParticlWallet(
|
||||
walletId: walletId,
|
||||
walletName: walletName,
|
||||
coin: coin,
|
||||
client: client,
|
||||
cachedClient: cachedClient,
|
||||
tracker: tracker);
|
||||
|
||||
case Coin.wownero:
|
||||
return WowneroWallet(
|
||||
walletId: walletId,
|
||||
|
|
|
@ -46,7 +46,7 @@ const int MINIMUM_CONFIRMATIONS = 1;
|
|||
const int DUST_LIMIT = 294;
|
||||
|
||||
const String GENESIS_HASH_MAINNET =
|
||||
"0000ee0784c195317ac95623e22fddb8c7b8825dc3998e0bb924d66866eccf4c";
|
||||
"000000000062b72c5e2ceb45fbc8587e807c155b0da735e6483dfba2f0a9c770";
|
||||
const String GENESIS_HASH_TESTNET =
|
||||
"0000594ada5310b367443ee0afd4fa3d0bbd5850ea4e33cdc7d6a904a7ec7c90";
|
||||
|
||||
|
@ -89,9 +89,6 @@ bip32.BIP32 getBip32NodeFromRoot(
|
|||
case 0x6c: // PART mainnet wif
|
||||
coinType = "44"; // PART mainnet
|
||||
break;
|
||||
case 0x2e: // PART testnet wif
|
||||
coinType = "1"; // PART testnet
|
||||
break;
|
||||
default:
|
||||
throw Exception("Invalid Particl network type used!");
|
||||
}
|
||||
|
@ -153,8 +150,6 @@ class ParticlWallet extends CoinServiceAPI {
|
|||
switch (coin) {
|
||||
case Coin.particl:
|
||||
return particl;
|
||||
case Coin.particlTestNet:
|
||||
return particltestnet;
|
||||
default:
|
||||
throw Exception("Invalid network type!");
|
||||
}
|
||||
|
@ -352,10 +347,6 @@ class ParticlWallet extends CoinServiceAPI {
|
|||
throw Exception("genesis hash does not match main net!");
|
||||
}
|
||||
break;
|
||||
case Coin.particlTestNet:
|
||||
if (features['genesis_hash'] != GENESIS_HASH_TESTNET) {
|
||||
throw Exception("genesis hash does not match test net!");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw Exception(
|
||||
|
@ -1474,11 +1465,6 @@ class ParticlWallet extends CoinServiceAPI {
|
|||
throw Exception("genesis hash does not match main net!");
|
||||
}
|
||||
break;
|
||||
case Coin.particlTestNet:
|
||||
if (features['genesis_hash'] != GENESIS_HASH_TESTNET) {
|
||||
throw Exception("genesis hash does not match test net!");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw Exception(
|
||||
"Attempted to generate a ParticlWallet using a non particl coin type: ${coin.name}");
|
||||
|
@ -3803,11 +3789,3 @@ final particl = NetworkType(
|
|||
pubKeyHash: 0x38,
|
||||
scriptHash: 0x3c,
|
||||
wif: 0x6c);
|
||||
|
||||
final particltestnet = NetworkType(
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bech32: 'tpw',
|
||||
bip32: Bip32Type(public: 0xe1427800, private: 0x04889478),
|
||||
pubKeyHash: 0x76,
|
||||
scriptHash: 0x7a,
|
||||
wif: 0x2e);
|
||||
|
|
|
@ -69,8 +69,6 @@ class AddressUtils {
|
|||
return Address.validateAddress(address, firoTestNetwork);
|
||||
case Coin.dogecoinTestNet:
|
||||
return Address.validateAddress(address, dogecointestnet);
|
||||
case Coin.particlTestNet:
|
||||
return Address.validateAddress(address, particltestnet);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -187,8 +187,6 @@ class _SVG {
|
|||
return firoTestnet;
|
||||
case Coin.dogecoinTestNet:
|
||||
return dogecoinTestnet;
|
||||
case Coin.particlTestNet:
|
||||
return particlTestnet;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -233,7 +231,6 @@ class _PNG {
|
|||
case Coin.namecoin:
|
||||
return namecoin;
|
||||
case Coin.particl:
|
||||
case Coin.particlTestNet:
|
||||
return particl;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,5 @@ Uri getBlockExplorerTransactionUrlFor({
|
|||
return Uri.parse("https://chainz.cryptoid.info/nmc/tx.dws?$txid.htm");
|
||||
case Coin.particl:
|
||||
return Uri.parse("https://chainz.cryptoid.info/part/tx.dws?$txid.htm");
|
||||
case Coin.particlTestNet:
|
||||
return Uri.parse("");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ abstract class Constants {
|
|||
case Coin.epicCash:
|
||||
case Coin.namecoin:
|
||||
case Coin.particl:
|
||||
case Coin.particlTestNet:
|
||||
values.addAll([24, 21, 18, 15, 12]);
|
||||
break;
|
||||
|
||||
|
@ -98,7 +97,6 @@ abstract class Constants {
|
|||
return 600;
|
||||
|
||||
case Coin.particl:
|
||||
case Coin.particlTestNet:
|
||||
return 600;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,8 +119,8 @@ abstract class DefaultNodes {
|
|||
);
|
||||
|
||||
static NodeModel get particl => NodeModel(
|
||||
host: "host",
|
||||
port: 123,
|
||||
host: "164.92.93.20",
|
||||
port: 50002,
|
||||
name: defaultName,
|
||||
id: _nodeId(Coin.particl),
|
||||
useSSL: true,
|
||||
|
@ -177,18 +177,6 @@ abstract class DefaultNodes {
|
|||
isDown: false,
|
||||
);
|
||||
|
||||
static NodeModel get particlTestnet => NodeModel(
|
||||
host: "host",
|
||||
port: 60002,
|
||||
name: defaultName,
|
||||
id: _nodeId(Coin.particlTestNet),
|
||||
useSSL: true,
|
||||
enabled: true,
|
||||
coinName: Coin.particlTestNet.name,
|
||||
isFailover: true,
|
||||
isDown: false,
|
||||
);
|
||||
|
||||
static NodeModel getNodeFor(Coin coin) {
|
||||
switch (coin) {
|
||||
case Coin.bitcoin:
|
||||
|
@ -229,9 +217,6 @@ abstract class DefaultNodes {
|
|||
|
||||
case Coin.dogecoinTestNet:
|
||||
return dogecoinTestnet;
|
||||
|
||||
case Coin.particlTestNet:
|
||||
return particlTestnet;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ enum Coin {
|
|||
bitcoincashTestnet,
|
||||
dogecoinTestNet,
|
||||
firoTestNet,
|
||||
particlTestNet
|
||||
}
|
||||
|
||||
// remove firotestnet for now
|
||||
|
@ -67,8 +66,6 @@ extension CoinExt on Coin {
|
|||
return "tFiro";
|
||||
case Coin.dogecoinTestNet:
|
||||
return "tDogecoin";
|
||||
case Coin.particlTestNet:
|
||||
return "tParticl";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,8 +97,6 @@ extension CoinExt on Coin {
|
|||
return "tFIRO";
|
||||
case Coin.dogecoinTestNet:
|
||||
return "tDOGE";
|
||||
case Coin.particlTestNet:
|
||||
return "tPART";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,8 +129,6 @@ extension CoinExt on Coin {
|
|||
return "firo";
|
||||
case Coin.dogecoinTestNet:
|
||||
return "dogecoin";
|
||||
case Coin.particlTestNet:
|
||||
return "particl";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,7 +144,6 @@ extension CoinExt on Coin {
|
|||
case Coin.bitcoincashTestnet:
|
||||
case Coin.firoTestNet:
|
||||
case Coin.dogecoinTestNet:
|
||||
case Coin.particlTestNet:
|
||||
return true;
|
||||
|
||||
case Coin.epicCash:
|
||||
|
@ -186,7 +178,6 @@ extension CoinExt on Coin {
|
|||
return xmr.MINIMUM_CONFIRMATIONS;
|
||||
|
||||
case Coin.particl:
|
||||
case Coin.particlTestNet:
|
||||
return particl.MINIMUM_CONFIRMATIONS;
|
||||
|
||||
case Coin.wownero:
|
||||
|
@ -227,7 +218,6 @@ Coin coinFromPrettyName(String name) {
|
|||
|
||||
case "Particl":
|
||||
case "particl":
|
||||
case "particlTestNet":
|
||||
return Coin.particl;
|
||||
|
||||
case "Namecoin":
|
||||
|
@ -292,8 +282,6 @@ Coin coinFromTickerCaseInsensitive(String ticker) {
|
|||
return Coin.firoTestNet;
|
||||
case "tdoge":
|
||||
return Coin.dogecoinTestNet;
|
||||
case "tparticl":
|
||||
return Coin.particlTestNet;
|
||||
case "wow":
|
||||
return Coin.wownero;
|
||||
default:
|
||||
|
|
|
@ -213,7 +213,6 @@ class CoinThemeColor {
|
|||
case Coin.wownero:
|
||||
return wownero;
|
||||
case Coin.particl:
|
||||
case Coin.particlTestNet:
|
||||
return particl;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1424,7 +1424,6 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
case Coin.wownero:
|
||||
return _coin.wownero;
|
||||
case Coin.particl:
|
||||
case Coin.particlTestNet:
|
||||
return _coin.particl;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue