Skip to content

Commit

Permalink
Merge pull request #651 from cypherstack/add-xtz
Browse files Browse the repository at this point in the history
Add xtz
  • Loading branch information
rehrar authored Aug 23, 2023
2 parents 1120171 + 5b4e4c4 commit 46252ea
Show file tree
Hide file tree
Showing 22 changed files with 1,108 additions and 135 deletions.
Binary file modified assets/default_themes/dark.zip
Binary file not shown.
Binary file modified assets/default_themes/light.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,19 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
// await client.getSyncStatus();
} catch (_) {}
break;

case Coin.stellar:
case Coin.stellarTestnet:
try {
testPassed = await testStellarNodeConnection(formData.host!, formData.port!);
} catch(_) {}
testPassed =
await testStellarNodeConnection(formData.host!, formData.port!);
} catch (_) {}
break;

case Coin.nano:
case Coin.banano:

case Coin.tezos:
throw UnimplementedError();
//TODO: check network/node
//TODO: check network/node
}

if (showFlushBar && mounted) {
Expand Down Expand Up @@ -738,6 +738,7 @@ class _NodeFormState extends ConsumerState<NodeForm> {
case Coin.namecoin:
case Coin.bitcoincash:
case Coin.particl:
case Coin.tezos:
case Coin.bitcoinTestNet:
case Coin.litecoinTestNet:
case Coin.bitcoincashTestnet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,19 @@ class _NodeDetailsViewState extends ConsumerState<NodeDetailsView> {
}
break;

case Coin.stellar:
case Coin.stellarTestnet:
try {
testPassed = await testStellarNodeConnection(node!.host, node.port);
} catch(_) {
testPassed = false;
}
break;
case Coin.nano:
case Coin.banano:

case Coin.tezos:
throw UnimplementedError();
//TODO: check network/node
//TODO: check network/node
case Coin.stellar:
case Coin.stellarTestnet:
try {
testPassed = await testStellarNodeConnection(node!.host, node.port);
} catch (_) {
testPassed = false;
}
break;
}

if (testPassed) {
Expand Down
32 changes: 21 additions & 11 deletions lib/services/coins/coin_service.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
/*
* This file is part of Stack Wallet.
*
*
* Copyright (c) 2023 Cypher Stack
* All Rights Reserved.
* The code is distributed under GPLv3 license, see LICENSE file for details.
Expand Down Expand Up @@ -28,6 +28,7 @@ import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart';
import 'package:stackwallet/services/coins/nano/nano_wallet.dart';
import 'package:stackwallet/services/coins/particl/particl_wallet.dart';
import 'package:stackwallet/services/coins/stellar/stellar_wallet.dart';
import 'package:stackwallet/services/coins/tezos/tezos_wallet.dart';
import 'package:stackwallet/services/coins/wownero/wownero_wallet.dart';
import 'package:stackwallet/services/transaction_notification_tracker.dart';
import 'package:stackwallet/utilities/amount/amount.dart';
Expand Down Expand Up @@ -228,6 +229,24 @@ 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,
walletName: walletName,
coin: coin,
secureStore: secureStorageInterface,
tracker: tracker,
);

case Coin.wownero:
return WowneroWallet(
walletId: walletId,
Expand Down Expand Up @@ -285,15 +304,6 @@ abstract class CoinServiceAPI {
cachedClient: cachedClient,
tracker: tracker,
);

case Coin.stellarTestnet:
return StellarWallet(
walletId: walletId,
walletName: walletName,
coin: coin,
secureStore: secureStorageInterface,
tracker: tracker,
);
}
}

Expand Down
Loading

0 comments on commit 46252ea

Please sign in to comment.