From 7061c3c40beb571883a5cb399ce6b11dfcaab5df Mon Sep 17 00:00:00 2001 From: likho Date: Thu, 27 Jul 2023 13:09:56 +0200 Subject: [PATCH] Add testnet to coin list --- assets/default_themes/dark.zip | Bin 659195 -> 659201 bytes assets/default_themes/light.zip | Bin 607086 -> 607092 bytes .../add_edit_node_view.dart | 2 ++ .../manage_nodes_views/node_details_view.dart | 1 + lib/services/coins/coin_service.dart | 9 ++++++++ .../coins/stellar/stellar_wallet.dart | 15 +++++++++++-- lib/themes/color_theme.dart | 3 ++- lib/themes/stack_colors.dart | 1 + lib/utilities/address_utils.dart | 2 ++ lib/utilities/amount/amount_unit.dart | 1 + lib/utilities/block_explorers.dart | 2 ++ lib/utilities/constants.dart | 5 +++++ lib/utilities/default_nodes.dart | 16 +++++++++++++ lib/utilities/enums/coin_enum.dart | 21 ++++++++++++++++++ .../enums/derive_path_type_enum.dart | 1 + lib/widgets/node_card.dart | 1 + lib/widgets/node_options_sheet.dart | 1 + 17 files changed, 78 insertions(+), 3 deletions(-) diff --git a/assets/default_themes/dark.zip b/assets/default_themes/dark.zip index 2d8b4528620fd78008303fc5e513c3bfa475aa83..fe11a5463f8ae50dad10e51a2f664cbdcc55a25c 100644 GIT binary patch delta 4166 zcmZvfc|26_7snZ6=H82;Wvmk;Q%07^mxduriO8;`l!WXmvXwEUh!#t@$r2GNdu2;x zDa!uk>l;ayY#B0-JPKjbi&TW3A(OCEh#3l#c-=VK&6zY>#o+-n$=VWm zvXV(Jv7EIC3WyM8{0Vob;T*_wP zFB2wpdjbboJ|!Q(l@*ue2PCp+-+ACTt3p8lpv%e3vJ?z_Wcg-8fXgfjxdbS)Dm=Rk z*l;uBw#ESqd`u!{0x7I|&DlWXai;G!2-+Z-#EAjPEYe*M#mE~E+itN4$Xprk<@3~1ztFkgUmCqcZ_-EB4Y-(BDT zz5Te@*pXu#Y-~S%CJ!6rr09S!7AzS%KOGB!24O=) zTO`k-SyID7_){^{Gi7s1G*$ZfzF3~k@0My#%|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r|FM%XFHZmh)PXciX5#-aMo5r# zQJI>TNO0SAk^?~9t$E@AP-8Q5eKU|II)Ix7!c5u+f+x3XPI80WZuXztn;rtwrN{%G z*y?(~v;A-Y3N+lRxr+kzAZBBHBE$g{sJ{6>j3KJ>ZnXV#)nVQrU}Mv{@b5qV2`{*p Ud(*x{9N-0|;f0F;8ynmI0ID=$Y5)KL diff --git a/assets/default_themes/light.zip b/assets/default_themes/light.zip index be20673a962761be17027b9a16c06716d44bc5a7..1453d6ba0606fba827105cb4a76af4df5b6b78dc 100644 GIT binary patch delta 3975 zcmZ8kc|2768#c_CIoFUz%C%(D6_b5$7;9uG>qJFm-*?xNB@;L1+P7iIQkIb3veGx+O#p67ku=UvV@pU?OEB}#ZXN;pXpPC_@@N1+>&!w#oD zheDH$L>Y`RoLgu+SpGVgg+Xr%Q@x>bdnr{0VplCD4;08x1^hq2%dz`R;hmZj@ptg4sgB>_b7zd=1IAY!hAIz9vQynDP)j6v7{UWTX80bm(?OEdv4K%WKl^gIl#g722* z#smDy48~%40dYp`86PkX0b_Rs06GIX3Ib?`G9C>WKv-f38Si^3brL$@rb!V1hs-BpR!93%B8anrP6GBu9AD!nC_88_q z`ngx07<5sqXKs??qY3?YW^@^+M}_=cOD&a#y=fex=T~t&qL26wXVlp{bWiWxb@k7_Llgs{ zaWU+)5{{$ak^6=IP^2x+ub2?%gl!wAEjM>ry3gRsU@`~$_t1U0X zY6vaagniQ)s$c`579}Q4tHqVpP9`$@I=qv& zPyHM;YRLTVp*W`X(Uf}1x42ON#u-|1hPuoWtM}E zte+)PqagKbn`%RFUY=!D?@L-Cu49=atZ*R_3tcyM$q=I8vW`h}sL8~qS-Zdb*ojg0 zPZZcOT)A?3I+e^Xjr?1+thW1LMD9;mRFKPk>AxgQcHuO)dU&Il4*hf&3MLdcFkr?rvZr(&v`5*au=BsN#+$p zN$Tom-%oua*)kqcL(P9y-sqWK$PqS4Dq|HhJB>4V+*XR?GEiiHURIWL%W1`IEQ+@@ zk0%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X_fI_-FU(HBX?g= z&pabFnSM(3976fiDrR+W_0Gt?HLXBEGmFLUC2pp#)Lwjrb9)o`tS&w#NEg=_2iEfw z@QeO-&=5|h#}?6fH(Pr2B(n*%IKA2mxo_iXEv-5v-+v6S-EHEy`g)(zUJLJYmd=}f z3z?jjG*hmH0dhR;so<+!yT!@;?5uW)x`B++Y!@nfcCr;mVw=X8ydPB+#>jGD!gC&$ z)kNGzJ3EQK^Lg_vtEczl{R|}9*EAv%4PR6p>}*(W8|>uYVsn|hno^eZx#AkZ$D-*> zqo9xEx87M))4l%OT@9&t>Pg|!NbcZe`EQ;`ZGs@a=e(ubWKnA>#FQ-BcM4W$wzLzH zVdUTJbhqB)r;=MFW;v49^&w{YA;v8#e>n={8cn+#jd6>iU5+Vz3HL;D(Dtj6(DOla z*hBXT^Bn)wCXnNv{+PS!Z=1bT0NBgN{IKmdXVyB;sBnkgvNcp3aYNNfu z?-HxML6n0km`k{*$=95KY-%K*325J4N#M884y4Qz;#+$exwgX?v%em~tiFh$wHw}M)fDcYrszrJH0s&^5w-sVH* z@FnVMFLg5C@{8?tjShwESZyvPFB!EBPs$JXIDc}y+};mr2;WYJAT$ZD{bV1!(ytug z_98{WZ{aSZM#`Uh>d}Y)gqk=L=PtVpEWQcrxl%)dxig1kfr=(hG}_`A2h!D6Hfg~<$>_-tXA_yP5!V-pi905DK)5;Hk zR}(gz$OECqmL0&tKysKkUZ z7XrX5^icCb2rvXS*gV?8#~7@uQTVh=QUuUF>B<*5=ECM-76rg-_`h17Ck;@s)9v0n z&J2nH?w|qNg{?SXe3JPneyk=|qakrH@&E7q!)-T89NYhzQi!n;>n)XzwlG{X9@Uoo841;A{W?oqIUNb(PZ{ y4ygb-Cp8+XfGWsfcUY`?Y|{T2;NUf3diWpBs0Q$!cvBdt0j$K#`~V&v-v0n9A@G#| diff --git a/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart b/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart index e7ce8b505..56b008093 100644 --- a/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart +++ b/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart @@ -197,6 +197,7 @@ class _AddEditNodeViewState extends ConsumerState { case Coin.nano: case Coin.banano: case Coin.stellar: + case Coin.stellarTestnet: throw UnimplementedError(); //TODO: check network/node } @@ -739,6 +740,7 @@ class _NodeFormState extends ConsumerState { case Coin.banano: case Coin.eCash: case Coin.stellar: + case Coin.stellarTestnet: return false; case Coin.ethereum: diff --git a/lib/pages/settings_views/global_settings_view/manage_nodes_views/node_details_view.dart b/lib/pages/settings_views/global_settings_view/manage_nodes_views/node_details_view.dart index 819b9f5d7..59ff1efad 100644 --- a/lib/pages/settings_views/global_settings_view/manage_nodes_views/node_details_view.dart +++ b/lib/pages/settings_views/global_settings_view/manage_nodes_views/node_details_view.dart @@ -173,6 +173,7 @@ class _NodeDetailsViewState extends ConsumerState { case Coin.nano: case Coin.banano: case Coin.stellar: + case Coin.stellarTestnet: throw UnimplementedError(); //TODO: check network/node } diff --git a/lib/services/coins/coin_service.dart b/lib/services/coins/coin_service.dart index ffb97a0a7..5aa6e382d 100644 --- a/lib/services/coins/coin_service.dart +++ b/lib/services/coins/coin_service.dart @@ -285,6 +285,15 @@ abstract class CoinServiceAPI { cachedClient: cachedClient, tracker: tracker, ); + + case Coin.stellarTestnet: + return StellarWallet( + walletId: walletId, + walletName: walletName, + coin: coin, + secureStore: secureStorageInterface, + tracker: tracker, + ); } } diff --git a/lib/services/coins/stellar/stellar_wallet.dart b/lib/services/coins/stellar/stellar_wallet.dart index c1fe652b6..1dd8eae77 100644 --- a/lib/services/coins/stellar/stellar_wallet.dart +++ b/lib/services/coins/stellar/stellar_wallet.dart @@ -41,6 +41,9 @@ const int MINIMUM_CONFIRMATIONS = 1; class StellarWallet extends CoinServiceAPI with WalletCache, WalletDB, CoinControlInterface { + late StellarSDK stellarSdk; + late Network stellarNetwork; + StellarWallet({ required String walletId, required String walletName, @@ -56,12 +59,20 @@ class StellarWallet extends CoinServiceAPI _secureStore = secureStore; initCache(walletId, coin); initWalletDB(mockableOverride: mockableOverride); + + if (coin.name == "stellarTestnet") { + stellarSdk = StellarSDK.TESTNET; + stellarNetwork = Network.TESTNET; + } else { + stellarSdk = StellarSDK.PUBLIC; + stellarNetwork = Network.PUBLIC; + } } late final TransactionNotificationTracker txTracker; late SecureStorageInterface _secureStore; - final StellarSDK stellarSdk = StellarSDK.PUBLIC; + // final StellarSDK stellarSdk = StellarSDK.PUBLIC; @override bool get isFavorite => _isFavorite ??= getCachedIsFavorite(); @@ -199,7 +210,7 @@ class StellarWallet extends CoinServiceAPI .build() ).build(); } - transaction.sign(senderKeyPair, Network.PUBLIC); + transaction.sign(senderKeyPair, stellarNetwork); try { SubmitTransactionResponse response = await stellarSdk.submitTransaction(transaction); diff --git a/lib/themes/color_theme.dart b/lib/themes/color_theme.dart index 87020ada7..c78d35c11 100644 --- a/lib/themes/color_theme.dart +++ b/lib/themes/color_theme.dart @@ -28,7 +28,7 @@ class CoinThemeColorDefault { Color get namecoin => const Color(0xFF91B1E1); Color get wownero => const Color(0xFFED80C1); Color get particl => const Color(0xFF8175BD); - Color get stellar => const Color(0xFFE8E8E8); // TODO: find color + Color get stellar => const Color(0xFF6600FF); Color get nano => const Color(0xFF209CE9); Color get banano => const Color(0xFFFBDD11); @@ -64,6 +64,7 @@ class CoinThemeColorDefault { case Coin.particl: return particl; case Coin.stellar: + case Coin.stellarTestnet: return stellar; case Coin.nano: return nano; diff --git a/lib/themes/stack_colors.dart b/lib/themes/stack_colors.dart index f653b7eac..5dbd55fe1 100644 --- a/lib/themes/stack_colors.dart +++ b/lib/themes/stack_colors.dart @@ -1708,6 +1708,7 @@ class StackColors extends ThemeExtension { case Coin.particl: return _coin.particl; case Coin.stellar: + case Coin.stellarTestnet: return _coin.stellar; case Coin.nano: return _coin.nano; diff --git a/lib/utilities/address_utils.dart b/lib/utilities/address_utils.dart index c2e759524..8766d706a 100644 --- a/lib/utilities/address_utils.dart +++ b/lib/utilities/address_utils.dart @@ -141,6 +141,8 @@ class AddressUtils { return Address.validateAddress(address, firoTestNetwork); case Coin.dogecoinTestNet: return Address.validateAddress(address, dogecointestnet); + case Coin.stellarTestnet: + return RegExp(r"^[G][A-Z0-9]{55}$").hasMatch(address); } } diff --git a/lib/utilities/amount/amount_unit.dart b/lib/utilities/amount/amount_unit.dart index 37939f1cc..ccdd4e095 100644 --- a/lib/utilities/amount/amount_unit.dart +++ b/lib/utilities/amount/amount_unit.dart @@ -51,6 +51,7 @@ enum AmountUnit { case Coin.eCash: case Coin.epicCash: case Coin.stellar: // TODO: check if this is correct + case Coin.stellarTestnet: return AmountUnit.values.sublist(0, 4); case Coin.monero: diff --git a/lib/utilities/block_explorers.dart b/lib/utilities/block_explorers.dart index ae27fae02..68c23479d 100644 --- a/lib/utilities/block_explorers.dart +++ b/lib/utilities/block_explorers.dart @@ -60,6 +60,8 @@ 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: + return Uri.parse("https://horizon-testnet.stellar.org/transactions/$txid"); } } diff --git a/lib/utilities/constants.dart b/lib/utilities/constants.dart index 665ae3169..3e6f814a2 100644 --- a/lib/utilities/constants.dart +++ b/lib/utilities/constants.dart @@ -100,6 +100,7 @@ abstract class Constants { return _satsPerCoinECash; case Coin.stellar: + case Coin.stellarTestnet: return _satsPerCoinStellar; } } @@ -140,6 +141,7 @@ abstract class Constants { return _decimalPlacesECash; case Coin.stellar: + case Coin.stellarTestnet: return _decimalPlacesStellar; } } @@ -164,6 +166,7 @@ abstract class Constants { case Coin.particl: case Coin.nano: case Coin.stellar: + case Coin.stellarTestnet: values.addAll([24, 12]); break; case Coin.banano: @@ -225,6 +228,7 @@ abstract class Constants { return 1; case Coin.stellar: + case Coin.stellarTestnet: return 5; } } @@ -254,6 +258,7 @@ abstract class Constants { case Coin.nano: case Coin.banano: case Coin.stellar: + case Coin.stellarTestnet: return 24; case Coin.monero: diff --git a/lib/utilities/default_nodes.dart b/lib/utilities/default_nodes.dart index 6c8bf08e3..9a6a0d914 100644 --- a/lib/utilities/default_nodes.dart +++ b/lib/utilities/default_nodes.dart @@ -34,6 +34,7 @@ abstract class DefaultNodes { bitcoincashTestnet, dogecoinTestnet, firoTestnet, + stellarTestnet, ]; static NodeModel get bitcoin => NodeModel( @@ -275,6 +276,18 @@ abstract class DefaultNodes { isDown: false, ); + 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, + ); + static NodeModel getNodeFor(Coin coin) { switch (coin) { case Coin.bitcoin: @@ -336,6 +349,9 @@ abstract class DefaultNodes { case Coin.dogecoinTestNet: return dogecoinTestnet; + + case Coin.stellarTestnet: + return stellarTestnet; } } } diff --git a/lib/utilities/enums/coin_enum.dart b/lib/utilities/enums/coin_enum.dart index e66822738..677d474e7 100644 --- a/lib/utilities/enums/coin_enum.dart +++ b/lib/utilities/enums/coin_enum.dart @@ -58,6 +58,7 @@ enum Coin { dogecoinTestNet, firoTestNet, litecoinTestNet, + stellarTestnet, } final int kTestNetCoinCount = 4; // Util.isDesktop ? 5 : 4; @@ -106,6 +107,8 @@ extension CoinExt on Coin { return "tFiro"; case Coin.dogecoinTestNet: return "tDogecoin"; + case Coin.stellarTestnet: + return "tStellar"; } } @@ -151,6 +154,8 @@ extension CoinExt on Coin { return "tFIRO"; case Coin.dogecoinTestNet: return "tDOGE"; + case Coin.stellarTestnet: + return "tXLM"; } } @@ -197,6 +202,8 @@ extension CoinExt on Coin { return "firo"; case Coin.dogecoinTestNet: return "dogecoin"; + case Coin.stellarTestnet: + return "stellar"; } } @@ -224,6 +231,7 @@ extension CoinExt on Coin { case Coin.nano: case Coin.banano: case Coin.stellar: + case Coin.stellarTestnet: return false; } } @@ -252,6 +260,7 @@ extension CoinExt on Coin { case Coin.nano: case Coin.banano: case Coin.stellar: + case Coin.stellarTestnet: return false; } } @@ -280,6 +289,7 @@ extension CoinExt on Coin { case Coin.litecoinTestNet: case Coin.bitcoincashTestnet: case Coin.firoTestNet: + case Coin.stellarTestnet: return true; } } @@ -317,6 +327,9 @@ extension CoinExt on Coin { case Coin.firoTestNet: return Coin.firo; + + case Coin.stellarTestnet: + return Coin.stellar; } } @@ -358,6 +371,7 @@ extension CoinExt on Coin { return particl.MINIMUM_CONFIRMATIONS; case Coin.stellar: + case Coin.stellarTestnet: return xlm.MINIMUM_CONFIRMATIONS; case Coin.wownero: @@ -467,6 +481,11 @@ Coin coinFromPrettyName(String name) { case "banano": return Coin.banano; + case "Stellar Testnet": + case "stellarTestnet": + case "tStellar": + return Coin.stellarTestnet; + default: throw ArgumentError.value( name, @@ -518,6 +537,8 @@ Coin coinFromTickerCaseInsensitive(String ticker) { return Coin.nano; case "ban": return Coin.banano; + case "txlm": + return Coin.stellarTestnet; default: throw ArgumentError.value( ticker, "name", "No Coin enum value with that ticker"); diff --git a/lib/utilities/enums/derive_path_type_enum.dart b/lib/utilities/enums/derive_path_type_enum.dart index 1dbd3f79b..07785a5ee 100644 --- a/lib/utilities/enums/derive_path_type_enum.dart +++ b/lib/utilities/enums/derive_path_type_enum.dart @@ -50,6 +50,7 @@ extension DerivePathTypeExt on DerivePathType { case Coin.nano: case Coin.banano: case Coin.stellar: + case Coin.stellarTestnet: throw UnsupportedError( "$coin does not use bitcoin style derivation paths"); } diff --git a/lib/widgets/node_card.dart b/lib/widgets/node_card.dart index b906320d3..57482119c 100644 --- a/lib/widgets/node_card.dart +++ b/lib/widgets/node_card.dart @@ -195,6 +195,7 @@ class _NodeCardState extends ConsumerState { case Coin.nano: case Coin.banano: case Coin.stellar: + case Coin.stellarTestnet: throw UnimplementedError(); //TODO: check network/node } diff --git a/lib/widgets/node_options_sheet.dart b/lib/widgets/node_options_sheet.dart index f8b788fed..b55f818a2 100644 --- a/lib/widgets/node_options_sheet.dart +++ b/lib/widgets/node_options_sheet.dart @@ -178,6 +178,7 @@ class NodeOptionsSheet extends ConsumerWidget { case Coin.nano: case Coin.banano: case Coin.stellar: + case Coin.stellarTestnet: throw UnimplementedError(); //TODO: check network/node }