Remove testnet

This commit is contained in:
sneurlax 2022-11-29 13:14:11 -06:00
parent d9338d34f2
commit ec399ade0a
11 changed files with 3 additions and 74 deletions

View file

@ -148,7 +148,6 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
case Coin.bitcoincashTestnet: case Coin.bitcoincashTestnet:
case Coin.firoTestNet: case Coin.firoTestNet:
case Coin.dogecoinTestNet: case Coin.dogecoinTestNet:
case Coin.particlTestNet:
final client = ElectrumX( final client = ElectrumX(
host: formData.host!, host: formData.host!,
port: formData.port!, port: formData.port!,
@ -695,7 +694,6 @@ class _NodeFormState extends ConsumerState<NodeForm> {
case Coin.bitcoincashTestnet: case Coin.bitcoincashTestnet:
case Coin.firoTestNet: case Coin.firoTestNet:
case Coin.dogecoinTestNet: case Coin.dogecoinTestNet:
case Coin.particlTestNet:
return false; return false;
case Coin.epicCash: case Coin.epicCash:

View file

@ -191,15 +191,6 @@ abstract class CoinServiceAPI {
cachedClient: cachedClient, cachedClient: cachedClient,
tracker: tracker); tracker: tracker);
case Coin.particlTestNet:
return ParticlWallet(
walletId: walletId,
walletName: walletName,
coin: coin,
client: client,
cachedClient: cachedClient,
tracker: tracker);
case Coin.wownero: case Coin.wownero:
return WowneroWallet( return WowneroWallet(
walletId: walletId, walletId: walletId,

View file

@ -46,7 +46,7 @@ const int MINIMUM_CONFIRMATIONS = 1;
const int DUST_LIMIT = 294; const int DUST_LIMIT = 294;
const String GENESIS_HASH_MAINNET = const String GENESIS_HASH_MAINNET =
"0000ee0784c195317ac95623e22fddb8c7b8825dc3998e0bb924d66866eccf4c"; "000000000062b72c5e2ceb45fbc8587e807c155b0da735e6483dfba2f0a9c770";
const String GENESIS_HASH_TESTNET = const String GENESIS_HASH_TESTNET =
"0000594ada5310b367443ee0afd4fa3d0bbd5850ea4e33cdc7d6a904a7ec7c90"; "0000594ada5310b367443ee0afd4fa3d0bbd5850ea4e33cdc7d6a904a7ec7c90";
@ -89,9 +89,6 @@ bip32.BIP32 getBip32NodeFromRoot(
case 0x6c: // PART mainnet wif case 0x6c: // PART mainnet wif
coinType = "44"; // PART mainnet coinType = "44"; // PART mainnet
break; break;
case 0x2e: // PART testnet wif
coinType = "1"; // PART testnet
break;
default: default:
throw Exception("Invalid Particl network type used!"); throw Exception("Invalid Particl network type used!");
} }
@ -153,8 +150,6 @@ class ParticlWallet extends CoinServiceAPI {
switch (coin) { switch (coin) {
case Coin.particl: case Coin.particl:
return particl; return particl;
case Coin.particlTestNet:
return particltestnet;
default: default:
throw Exception("Invalid network type!"); throw Exception("Invalid network type!");
} }
@ -352,10 +347,6 @@ class ParticlWallet extends CoinServiceAPI {
throw Exception("genesis hash does not match main net!"); throw Exception("genesis hash does not match main net!");
} }
break; break;
case Coin.particlTestNet:
if (features['genesis_hash'] != GENESIS_HASH_TESTNET) {
throw Exception("genesis hash does not match test net!");
}
break; break;
default: default:
throw Exception( throw Exception(
@ -1474,11 +1465,6 @@ class ParticlWallet extends CoinServiceAPI {
throw Exception("genesis hash does not match main net!"); throw Exception("genesis hash does not match main net!");
} }
break; break;
case Coin.particlTestNet:
if (features['genesis_hash'] != GENESIS_HASH_TESTNET) {
throw Exception("genesis hash does not match test net!");
}
break;
default: default:
throw Exception( throw Exception(
"Attempted to generate a ParticlWallet using a non particl coin type: ${coin.name}"); "Attempted to generate a ParticlWallet using a non particl coin type: ${coin.name}");
@ -3803,11 +3789,3 @@ final particl = NetworkType(
pubKeyHash: 0x38, pubKeyHash: 0x38,
scriptHash: 0x3c, scriptHash: 0x3c,
wif: 0x6c); wif: 0x6c);
final particltestnet = NetworkType(
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'tpw',
bip32: Bip32Type(public: 0xe1427800, private: 0x04889478),
pubKeyHash: 0x76,
scriptHash: 0x7a,
wif: 0x2e);

View file

@ -74,8 +74,6 @@ class AddressUtils {
return Address.validateAddress(address, firoTestNetwork); return Address.validateAddress(address, firoTestNetwork);
case Coin.dogecoinTestNet: case Coin.dogecoinTestNet:
return Address.validateAddress(address, dogecointestnet); return Address.validateAddress(address, dogecointestnet);
case Coin.particlTestNet:
return Address.validateAddress(address, particltestnet);
} }
} }

View file

@ -228,8 +228,6 @@ class _SVG {
return firoTestnet; return firoTestnet;
case Coin.dogecoinTestNet: case Coin.dogecoinTestNet:
return dogecoinTestnet; return dogecoinTestnet;
case Coin.particlTestNet:
return particlTestnet;
} }
} }
} }
@ -281,7 +279,6 @@ class _PNG {
case Coin.namecoin: case Coin.namecoin:
return namecoin; return namecoin;
case Coin.particl: case Coin.particl:
case Coin.particlTestNet:
return particl; return particl;
} }
} }

View file

@ -37,7 +37,5 @@ Uri getBlockExplorerTransactionUrlFor({
return Uri.parse("https://chainz.cryptoid.info/nmc/tx.dws?$txid.htm"); return Uri.parse("https://chainz.cryptoid.info/nmc/tx.dws?$txid.htm");
case Coin.particl: case Coin.particl:
return Uri.parse("https://chainz.cryptoid.info/part/tx.dws?$txid.htm"); return Uri.parse("https://chainz.cryptoid.info/part/tx.dws?$txid.htm");
case Coin.particlTestNet:
return Uri.parse("");
} }
} }

View file

@ -104,7 +104,6 @@ abstract class Constants {
case Coin.epicCash: case Coin.epicCash:
case Coin.namecoin: case Coin.namecoin:
case Coin.particl: case Coin.particl:
case Coin.particlTestNet:
values.addAll([24, 21, 18, 15, 12]); values.addAll([24, 21, 18, 15, 12]);
break; break;
@ -154,7 +153,6 @@ abstract class Constants {
return 600; return 600;
case Coin.particl: case Coin.particl:
case Coin.particlTestNet:
return 600; return 600;
} }
} }

View file

@ -146,8 +146,8 @@ abstract class DefaultNodes {
); );
static NodeModel get particl => NodeModel( static NodeModel get particl => NodeModel(
host: "host", host: "164.92.93.20",
port: 123, port: 50002,
name: defaultName, name: defaultName,
id: _nodeId(Coin.particl), id: _nodeId(Coin.particl),
useSSL: true, useSSL: true,
@ -204,18 +204,6 @@ abstract class DefaultNodes {
isDown: false, 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) { static NodeModel getNodeFor(Coin coin) {
switch (coin) { switch (coin) {
case Coin.bitcoin: case Coin.bitcoin:
@ -262,9 +250,6 @@ abstract class DefaultNodes {
case Coin.dogecoinTestNet: case Coin.dogecoinTestNet:
return dogecoinTestnet; return dogecoinTestnet;
case Coin.particlTestNet:
return particlTestnet;
} }
} }

View file

@ -38,7 +38,6 @@ enum Coin {
bitcoincashTestnet, bitcoincashTestnet,
dogecoinTestNet, dogecoinTestNet,
firoTestNet, firoTestNet,
particlTestNet
} }
final int kTestNetCoinCount = Util.isDesktop ? 5 : 4; final int kTestNetCoinCount = Util.isDesktop ? 5 : 4;
@ -76,8 +75,6 @@ extension CoinExt on Coin {
return "tFiro"; return "tFiro";
case Coin.dogecoinTestNet: case Coin.dogecoinTestNet:
return "tDogecoin"; return "tDogecoin";
case Coin.particlTestNet:
return "tParticl";
} }
} }
@ -113,8 +110,6 @@ extension CoinExt on Coin {
return "tFIRO"; return "tFIRO";
case Coin.dogecoinTestNet: case Coin.dogecoinTestNet:
return "tDOGE"; return "tDOGE";
case Coin.particlTestNet:
return "tPART";
} }
} }
@ -151,8 +146,6 @@ extension CoinExt on Coin {
return "firo"; return "firo";
case Coin.dogecoinTestNet: case Coin.dogecoinTestNet:
return "dogecoin"; return "dogecoin";
case Coin.particlTestNet:
return "particl";
} }
} }
@ -170,7 +163,6 @@ extension CoinExt on Coin {
case Coin.bitcoincashTestnet: case Coin.bitcoincashTestnet:
case Coin.firoTestNet: case Coin.firoTestNet:
case Coin.dogecoinTestNet: case Coin.dogecoinTestNet:
case Coin.particlTestNet:
return true; return true;
case Coin.epicCash: case Coin.epicCash:
@ -209,7 +201,6 @@ extension CoinExt on Coin {
return xmr.MINIMUM_CONFIRMATIONS; return xmr.MINIMUM_CONFIRMATIONS;
case Coin.particl: case Coin.particl:
case Coin.particlTestNet:
return particl.MINIMUM_CONFIRMATIONS; return particl.MINIMUM_CONFIRMATIONS;
case Coin.wownero: case Coin.wownero:
@ -254,7 +245,6 @@ Coin coinFromPrettyName(String name) {
case "Particl": case "Particl":
case "particl": case "particl":
case "particlTestNet":
return Coin.particl; return Coin.particl;
case "Namecoin": case "Namecoin":
@ -332,8 +322,6 @@ Coin coinFromTickerCaseInsensitive(String ticker) {
return Coin.firoTestNet; return Coin.firoTestNet;
case "tdoge": case "tdoge":
return Coin.dogecoinTestNet; return Coin.dogecoinTestNet;
case "tparticl":
return Coin.particlTestNet;
case "wow": case "wow":
return Coin.wownero; return Coin.wownero;
default: default:

View file

@ -221,7 +221,6 @@ class CoinThemeColor {
case Coin.wownero: case Coin.wownero:
return wownero; return wownero;
case Coin.particl: case Coin.particl:
case Coin.particlTestNet:
return particl; return particl;
} }
} }

View file

@ -1444,7 +1444,6 @@ class StackColors extends ThemeExtension<StackColors> {
case Coin.wownero: case Coin.wownero:
return _coin.wownero; return _coin.wownero;
case Coin.particl: case Coin.particl:
case Coin.particlTestNet:
return _coin.particl; return _coin.particl;
} }
} }