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

View file

@ -191,15 +191,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,

View file

@ -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);

View file

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

View file

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

View file

@ -37,7 +37,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("");
}
}

View file

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

View file

@ -146,8 +146,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,
@ -204,18 +204,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:
@ -262,9 +250,6 @@ abstract class DefaultNodes {
case Coin.dogecoinTestNet:
return dogecoinTestnet;
case Coin.particlTestNet:
return particlTestnet;
}
}

View file

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

View file

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

View file

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