mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-11 05:04:35 +00:00
add tezos rpc node test connection logic
This commit is contained in:
parent
f524bc1d87
commit
700943ada4
3 changed files with 25 additions and 4 deletions
|
@ -30,6 +30,7 @@ import 'package:stackwallet/utilities/test_monero_node_connection.dart';
|
|||
import 'package:stackwallet/utilities/test_stellar_node_connection.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/wallets/api/tezos/tezos_rpc_api.dart';
|
||||
import 'package:stackwallet/widgets/background.dart';
|
||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
|
@ -205,9 +206,15 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
|
|||
|
||||
case Coin.nano:
|
||||
case Coin.banano:
|
||||
case Coin.tezos:
|
||||
throw UnimplementedError();
|
||||
//TODO: check network/node
|
||||
case Coin.tezos:
|
||||
try {
|
||||
testPassed = await TezosRpcAPI.testNetworkConnection(
|
||||
nodeInfo: (host: formData.host!, port: formData.port!),
|
||||
);
|
||||
} catch (_) {}
|
||||
break;
|
||||
}
|
||||
|
||||
if (showFlushBar && mounted) {
|
||||
|
|
|
@ -29,6 +29,7 @@ import 'package:stackwallet/utilities/test_monero_node_connection.dart';
|
|||
import 'package:stackwallet/utilities/test_stellar_node_connection.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/wallets/api/tezos/tezos_rpc_api.dart';
|
||||
import 'package:stackwallet/widgets/background.dart';
|
||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
|
@ -173,10 +174,16 @@ class _NodeDetailsViewState extends ConsumerState<NodeDetailsView> {
|
|||
|
||||
case Coin.nano:
|
||||
case Coin.banano:
|
||||
case Coin.tezos:
|
||||
// TODO: fix this lacking code
|
||||
throw UnimplementedError();
|
||||
//TODO: check network/node
|
||||
case Coin.tezos:
|
||||
try {
|
||||
testPassed = await TezosRpcAPI.testNetworkConnection(
|
||||
nodeInfo: (host: node!.host, port: node!.port),
|
||||
);
|
||||
} catch (_) {}
|
||||
break;
|
||||
case Coin.stellar:
|
||||
case Coin.stellarTestnet:
|
||||
try {
|
||||
|
|
|
@ -33,6 +33,7 @@ import 'package:stackwallet/utilities/test_monero_node_connection.dart';
|
|||
import 'package:stackwallet/utilities/test_stellar_node_connection.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/wallets/api/tezos/tezos_rpc_api.dart';
|
||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart';
|
||||
import 'package:stackwallet/widgets/expandable.dart';
|
||||
|
@ -194,9 +195,15 @@ class _NodeCardState extends ConsumerState<NodeCard> {
|
|||
|
||||
case Coin.nano:
|
||||
case Coin.banano:
|
||||
case Coin.tezos:
|
||||
//TODO: check network/node
|
||||
throw UnimplementedError();
|
||||
//TODO: check network/node
|
||||
case Coin.tezos:
|
||||
try {
|
||||
testPassed = await TezosRpcAPI.testNetworkConnection(
|
||||
nodeInfo: (host: node.host, port: node.port),
|
||||
);
|
||||
} catch (_) {}
|
||||
break;
|
||||
case Coin.stellar:
|
||||
case Coin.stellarTestnet:
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue