mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
fix stellarTestNet and dependency problems
This commit is contained in:
parent
f4688bd041
commit
a1ef84fbe6
16 changed files with 49 additions and 35 deletions
|
@ -197,7 +197,7 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
|
|||
case Coin.nano:
|
||||
case Coin.banano:
|
||||
case Coin.stellar:
|
||||
case Coin.stellarTestnet:
|
||||
case Coin.stellarTestNet:
|
||||
throw UnimplementedError();
|
||||
//TODO: check network/node
|
||||
case Coin.tezos:
|
||||
|
@ -732,11 +732,14 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
|||
case Coin.namecoin:
|
||||
case Coin.bitcoincash:
|
||||
case Coin.particl:
|
||||
case Coin.stellar:
|
||||
case Coin.tezos:
|
||||
case Coin.bitcoinTestNet:
|
||||
case Coin.litecoinTestNet:
|
||||
case Coin.bitcoincashTestnet:
|
||||
case Coin.firoTestNet:
|
||||
case Coin.dogecoinTestNet:
|
||||
case Coin.stellarTestNet:
|
||||
case Coin.epicCash:
|
||||
case Coin.nano:
|
||||
case Coin.banano:
|
||||
|
|
|
@ -174,7 +174,7 @@ class _NodeDetailsViewState extends ConsumerState<NodeDetailsView> {
|
|||
case Coin.banano:
|
||||
case Coin.tezos:
|
||||
case Coin.stellar:
|
||||
case Coin.stellarTestnet:
|
||||
case Coin.stellarTestNet:
|
||||
throw UnimplementedError();
|
||||
//TODO: check network/node
|
||||
}
|
||||
|
|
|
@ -229,6 +229,15 @@ abstract class CoinServiceAPI {
|
|||
tracker: tracker,
|
||||
);
|
||||
|
||||
case Coin.stellarTestNet:
|
||||
return StellarWallet(
|
||||
walletId: walletId,
|
||||
walletName: walletName,
|
||||
coin: coin,
|
||||
secureStore: secureStorageInterface,
|
||||
tracker: tracker,
|
||||
);
|
||||
|
||||
case Coin.tezos:
|
||||
return TezosWallet(
|
||||
walletId: walletId,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -292,10 +292,10 @@ abstract class DefaultNodes {
|
|||
host: "https://horizon-testnet.stellar.org/",
|
||||
port: 50022,
|
||||
name: defaultName,
|
||||
id: _nodeId(Coin.stellarTestnet),
|
||||
id: _nodeId(Coin.stellarTestNet),
|
||||
useSSL: true,
|
||||
enabled: true,
|
||||
coinName: Coin.stellarTestnet.name,
|
||||
coinName: Coin.stellarTestNet.name,
|
||||
isFailover: true,
|
||||
isDown: false,
|
||||
);
|
||||
|
@ -365,7 +365,7 @@ abstract class DefaultNodes {
|
|||
case Coin.dogecoinTestNet:
|
||||
return dogecoinTestnet;
|
||||
|
||||
case Coin.stellarTestnet:
|
||||
case Coin.stellarTestNet:
|
||||
return stellarTestnet;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,9 +60,10 @@ enum Coin {
|
|||
dogecoinTestNet,
|
||||
firoTestNet,
|
||||
litecoinTestNet,
|
||||
stellarTestNet,
|
||||
}
|
||||
|
||||
final int kTestNetCoinCount = 4; // Util.isDesktop ? 5 : 4;
|
||||
final int kTestNetCoinCount = 5; // Util.isDesktop ? 5 : 4;
|
||||
// remove firotestnet for now
|
||||
|
||||
extension CoinExt on Coin {
|
||||
|
@ -110,6 +111,8 @@ extension CoinExt on Coin {
|
|||
return "tFiro";
|
||||
case Coin.dogecoinTestNet:
|
||||
return "tDogecoin";
|
||||
case Coin.stellarTestNet:
|
||||
return "tStellar";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,7 +160,7 @@ extension CoinExt on Coin {
|
|||
return "tFIRO";
|
||||
case Coin.dogecoinTestNet:
|
||||
return "tDOGE";
|
||||
case Coin.stellarTestnet:
|
||||
case Coin.stellarTestNet:
|
||||
return "tXLM";
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +210,7 @@ extension CoinExt on Coin {
|
|||
return "firo";
|
||||
case Coin.dogecoinTestNet:
|
||||
return "dogecoin";
|
||||
case Coin.stellarTestnet:
|
||||
case Coin.stellarTestNet:
|
||||
return "stellar";
|
||||
}
|
||||
}
|
||||
|
@ -237,7 +240,7 @@ extension CoinExt on Coin {
|
|||
case Coin.nano:
|
||||
case Coin.banano:
|
||||
case Coin.stellar:
|
||||
case Coin.stellarTestnet:
|
||||
case Coin.stellarTestNet:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -267,7 +270,7 @@ extension CoinExt on Coin {
|
|||
case Coin.nano:
|
||||
case Coin.banano:
|
||||
case Coin.stellar:
|
||||
case Coin.stellarTestnet:
|
||||
case Coin.stellarTestNet:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -297,7 +300,7 @@ extension CoinExt on Coin {
|
|||
case Coin.litecoinTestNet:
|
||||
case Coin.bitcoincashTestnet:
|
||||
case Coin.firoTestNet:
|
||||
case Coin.stellarTestnet:
|
||||
case Coin.stellarTestNet:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -337,7 +340,7 @@ extension CoinExt on Coin {
|
|||
case Coin.firoTestNet:
|
||||
return Coin.firo;
|
||||
|
||||
case Coin.stellarTestnet:
|
||||
case Coin.stellarTestNet:
|
||||
return Coin.stellar;
|
||||
}
|
||||
}
|
||||
|
@ -380,7 +383,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:
|
||||
|
@ -500,7 +503,7 @@ Coin coinFromPrettyName(String name) {
|
|||
case "Stellar Testnet":
|
||||
case "stellarTestnet":
|
||||
case "tStellar":
|
||||
return Coin.stellarTestnet;
|
||||
return Coin.stellarTestNet;
|
||||
|
||||
default:
|
||||
throw ArgumentError.value(
|
||||
|
@ -556,7 +559,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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -196,7 +196,7 @@ class _NodeCardState extends ConsumerState<NodeCard> {
|
|||
case Coin.banano:
|
||||
case Coin.tezos:
|
||||
case Coin.stellar:
|
||||
case Coin.stellarTestnet:
|
||||
case Coin.stellarTestNet:
|
||||
throw UnimplementedError();
|
||||
//TODO: check network/node
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
10
pubspec.lock
10
pubspec.lock
|
@ -459,7 +459,7 @@ packages:
|
|||
source: hosted
|
||||
version: "0.6.0"
|
||||
dio:
|
||||
dependency: "direct overridden"
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dio
|
||||
sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8"
|
||||
|
@ -1297,10 +1297,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: pretty_dio_logger
|
||||
sha256: "00b80053063935cf9a6190da344c5373b9d0e92da4c944c878ff2fbef0ef6dc2"
|
||||
sha256: "948f7eeb36e7aa0760b51c1a8e3331d4b21e36fabd39efca81f585ed93893544"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
version: "1.2.0-beta-1"
|
||||
process:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1519,10 +1519,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: stellar_flutter_sdk
|
||||
sha256: "7a9b7dc76018bbd0b9c828045cf0e26e07ec44208fb1a1733273de2390205475"
|
||||
sha256: "4c55b1b6dfbde7f89bba59a422754280715fa3b5726cff5e7eeaed454d2c4b89"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.6.0"
|
||||
version: "1.5.3"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -138,7 +138,7 @@ dependencies:
|
|||
desktop_drop: ^0.4.1
|
||||
nanodart: ^2.0.0
|
||||
basic_utils: ^5.5.4
|
||||
stellar_flutter_sdk: ^1.6.0
|
||||
stellar_flutter_sdk: ^1.5.3
|
||||
tezart: ^2.0.5
|
||||
|
||||
dev_dependencies:
|
||||
|
@ -203,7 +203,6 @@ dependency_overrides:
|
|||
crypto: 3.0.2
|
||||
analyzer: ^5.2.0
|
||||
pinenacl: ^0.3.3
|
||||
dio : ^4.0.0
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
|
|
Loading…
Reference in a new issue