diff --git a/lib/wallets/wallet/impl/tezos_wallet.dart b/lib/wallets/wallet/impl/tezos_wallet.dart index d1df08502..bdf3374a8 100644 --- a/lib/wallets/wallet/impl/tezos_wallet.dart +++ b/lib/wallets/wallet/impl/tezos_wallet.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:isar/isar.dart'; import 'package:stackwallet/models/balance.dart'; import 'package:stackwallet/models/isar/models/blockchain_data/address.dart'; @@ -5,6 +7,7 @@ import 'package:stackwallet/models/isar/models/blockchain_data/transaction.dart' import 'package:stackwallet/models/node_model.dart'; import 'package:stackwallet/models/paymint/fee_object_model.dart'; import 'package:stackwallet/services/node_service.dart'; +import 'package:stackwallet/services/tor_service.dart'; import 'package:stackwallet/utilities/amount/amount.dart'; import 'package:stackwallet/utilities/default_nodes.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -105,9 +108,12 @@ class TezosWallet extends Bip39Wallet { // print("COUNTER: $counter"); // print("customFee: $customFee"); // } - final tezartClient = tezart.TezartClient( - server, - ); + ({InternetAddress host, int port})? proxyInfo = + prefs.useTor ? TorService.sharedInstance.getProxyInfo() : null; + final tezartClient = tezart.TezartClient(server, + proxy: proxyInfo != null + ? "socks5://${proxyInfo.host}:${proxyInfo.port};" + : null); final opList = await tezartClient.transferOperation( source: sourceKeyStore, diff --git a/pubspec.lock b/pubspec.lock index 4e4d39cb7..0ff73a46f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1740,8 +1740,8 @@ packages: dependency: "direct main" description: path: "." - ref: "8a7070f533e63dd150edae99476f6853bfb25913" - resolved-ref: "8a7070f533e63dd150edae99476f6853bfb25913" + ref: "9d4f326b19ef6ab51a40038ee2ddd3296454f228" + resolved-ref: "9d4f326b19ef6ab51a40038ee2ddd3296454f228" url: "https://github.com/cypherstack/tezart.git" source: git version: "2.0.5" diff --git a/pubspec.yaml b/pubspec.yaml index 16db28f97..bc1472187 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -166,7 +166,7 @@ dependencies: tezart: git: url: https://github.com/cypherstack/tezart.git - ref: 8a7070f533e63dd150edae99476f6853bfb25913 + ref: 1fb2669e2b530367a449217e952f220d5e667043 socks5_proxy: ^1.0.3+dev.3 convert: ^3.1.1 flutter_hooks: ^0.20.3