revert enum name

This commit is contained in:
julian 2023-08-23 11:29:10 -06:00
parent 02b67c2a2e
commit 63ab0b09e8
14 changed files with 41 additions and 42 deletions

View file

@ -196,7 +196,7 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
} catch (_) {}
break;
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
try {
testPassed =
await testStellarNodeConnection(formData.host!, formData.port!);
@ -750,7 +750,7 @@ class _NodeFormState extends ConsumerState<NodeForm> {
case Coin.banano:
case Coin.eCash:
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return false;
case Coin.ethereum:

View file

@ -174,7 +174,7 @@ class _NodeDetailsViewState extends ConsumerState<NodeDetailsView> {
case Coin.nano:
case Coin.banano:
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
try {
testPassed = await testStellarNodeConnection(node!.host, node.port);
} catch (_) {

View file

@ -229,7 +229,7 @@ abstract class CoinServiceAPI {
tracker: tracker,
);
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return StellarWallet(
walletId: walletId,
walletName: walletName,

View file

@ -65,7 +65,7 @@ class CoinThemeColorDefault {
case Coin.particl:
return particl;
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return stellar;
case Coin.nano:
return nano;

View file

@ -1708,7 +1708,7 @@ class StackColors extends ThemeExtension<StackColors> {
case Coin.particl:
return _coin.particl;
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return _coin.stellar;
case Coin.nano:
return _coin.nano;

View file

@ -143,7 +143,7 @@ class AddressUtils {
return Address.validateAddress(address, firoTestNetwork);
case Coin.dogecoinTestNet:
return Address.validateAddress(address, dogecointestnet);
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return RegExp(r"^[G][A-Z0-9]{55}$").hasMatch(address);
}
}

View file

@ -51,7 +51,7 @@ enum AmountUnit {
case Coin.eCash:
case Coin.epicCash:
case Coin.stellar: // TODO: check if this is correct
case Coin.stellarTestNet:
case Coin.stellarTestnet:
case Coin.tezos:
return AmountUnit.values.sublist(0, 4);

View file

@ -60,7 +60,7 @@ Uri getDefaultBlockExplorerUrlFor({
return Uri.parse("https://www.nanolooker.com/block/$txid");
case Coin.banano:
return Uri.parse("https://www.bananolooker.com/block/$txid");
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return Uri.parse("https://testnet.stellarchain.io/transactions/$txid");
case Coin.tezos:
return Uri.parse("https://tzstats.com/$txid");

View file

@ -102,7 +102,7 @@ abstract class Constants {
return _satsPerCoinECash;
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return _satsPerCoinStellar;
case Coin.tezos:
@ -146,7 +146,7 @@ abstract class Constants {
return _decimalPlacesECash;
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return _decimalPlacesStellar;
case Coin.tezos:
@ -174,7 +174,7 @@ abstract class Constants {
case Coin.particl:
case Coin.nano:
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
values.addAll([24, 12]);
break;
case Coin.banano:
@ -238,7 +238,7 @@ abstract class Constants {
return 1;
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return 5;
case Coin.tezos:
@ -271,7 +271,7 @@ abstract class Constants {
case Coin.nano:
case Coin.banano:
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
case Coin.tezos:
return 24;

View file

@ -191,8 +191,7 @@ abstract class DefaultNodes {
enabled: true,
coinName: Coin.stellar.name,
isFailover: true,
isDown: false
);
isDown: false);
static NodeModel get tezos => NodeModel(
// TODO: Change this to stack wallet one
@ -289,16 +288,16 @@ abstract class DefaultNodes {
);
static NodeModel get stellarTestnet => NodeModel(
host: "https://horizon-testnet.stellar.org/",
port: 50022,
name: defaultName,
id: _nodeId(Coin.stellarTestNet),
useSSL: true,
enabled: true,
coinName: Coin.stellarTestNet.name,
isFailover: true,
isDown: false,
);
host: "https://horizon-testnet.stellar.org/",
port: 50022,
name: defaultName,
id: _nodeId(Coin.stellarTestnet),
useSSL: true,
enabled: true,
coinName: Coin.stellarTestnet.name,
isFailover: true,
isDown: false,
);
static NodeModel getNodeFor(Coin coin) {
switch (coin) {
@ -365,7 +364,7 @@ abstract class DefaultNodes {
case Coin.dogecoinTestNet:
return dogecoinTestnet;
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return stellarTestnet;
}
}

View file

@ -60,7 +60,7 @@ enum Coin {
dogecoinTestNet,
firoTestNet,
litecoinTestNet,
stellarTestNet,
stellarTestnet,
}
final int kTestNetCoinCount = 5; // Util.isDesktop ? 5 : 4;
@ -111,7 +111,7 @@ extension CoinExt on Coin {
return "tFiro";
case Coin.dogecoinTestNet:
return "tDogecoin";
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return "tStellar";
}
}
@ -160,7 +160,7 @@ extension CoinExt on Coin {
return "tFIRO";
case Coin.dogecoinTestNet:
return "tDOGE";
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return "tXLM";
}
}
@ -210,7 +210,7 @@ extension CoinExt on Coin {
return "firo";
case Coin.dogecoinTestNet:
return "dogecoin";
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return "stellar";
}
}
@ -240,7 +240,7 @@ extension CoinExt on Coin {
case Coin.nano:
case Coin.banano:
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return false;
}
}
@ -262,7 +262,7 @@ extension CoinExt on Coin {
case Coin.ethereum:
case Coin.eCash:
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
case Coin.tezos:
return true;
@ -300,7 +300,7 @@ extension CoinExt on Coin {
case Coin.nano:
case Coin.banano:
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return false;
}
}
@ -330,7 +330,7 @@ extension CoinExt on Coin {
case Coin.litecoinTestNet:
case Coin.bitcoincashTestnet:
case Coin.firoTestNet:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return true;
}
}
@ -370,7 +370,7 @@ extension CoinExt on Coin {
case Coin.firoTestNet:
return Coin.firo;
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return Coin.stellar;
}
}
@ -413,7 +413,7 @@ extension CoinExt on Coin {
return particl.MINIMUM_CONFIRMATIONS;
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
return xlm.MINIMUM_CONFIRMATIONS;
case Coin.tezos:
@ -534,7 +534,7 @@ Coin coinFromPrettyName(String name) {
case "stellarTestnet":
case "stellarTestNet":
case "tStellar":
return Coin.stellarTestNet;
return Coin.stellarTestnet;
default:
throw ArgumentError.value(
@ -590,7 +590,7 @@ Coin coinFromTickerCaseInsensitive(String ticker) {
case "ban":
return Coin.banano;
case "txlm":
return Coin.stellarTestNet;
return Coin.stellarTestnet;
default:
throw ArgumentError.value(
ticker, "name", "No Coin enum value with that ticker");

View file

@ -50,7 +50,7 @@ extension DerivePathTypeExt on DerivePathType {
case Coin.nano:
case Coin.banano:
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
case Coin.tezos: // TODO: Is this true?
throw UnsupportedError(
"$coin does not use bitcoin style derivation paths");

View file

@ -197,7 +197,7 @@ class _NodeCardState extends ConsumerState<NodeCard> {
case Coin.banano:
case Coin.tezos:
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
try {
testPassed = await testStellarNodeConnection(node.host, node.port);
} catch (_) {

View file

@ -179,7 +179,7 @@ class NodeOptionsSheet extends ConsumerWidget {
case Coin.banano:
case Coin.tezos:
case Coin.stellar:
case Coin.stellarTestNet:
case Coin.stellarTestnet:
throw UnimplementedError();
//TODO: check network/node
}