Merge pull request #836 from cypherstack/tezos

Use Tezos over Tor (as appropriate)
This commit is contained in:
julian-CStack 2024-04-24 09:08:08 -06:00 committed by GitHub
commit 1f41aa2e20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 6 deletions

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:isar/isar.dart'; import 'package:isar/isar.dart';
import 'package:stackwallet/models/balance.dart'; import 'package:stackwallet/models/balance.dart';
import 'package:stackwallet/models/isar/models/blockchain_data/address.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/node_model.dart';
import 'package:stackwallet/models/paymint/fee_object_model.dart'; import 'package:stackwallet/models/paymint/fee_object_model.dart';
import 'package:stackwallet/services/node_service.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/amount/amount.dart';
import 'package:stackwallet/utilities/default_nodes.dart'; import 'package:stackwallet/utilities/default_nodes.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart';
@ -105,9 +108,12 @@ class TezosWallet extends Bip39Wallet<Tezos> {
// print("COUNTER: $counter"); // print("COUNTER: $counter");
// print("customFee: $customFee"); // print("customFee: $customFee");
// } // }
final tezartClient = tezart.TezartClient( ({InternetAddress host, int port})? proxyInfo =
server, 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( final opList = await tezartClient.transferOperation(
source: sourceKeyStore, source: sourceKeyStore,

View file

@ -1740,8 +1740,8 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
path: "." path: "."
ref: "8a7070f533e63dd150edae99476f6853bfb25913" ref: "9d4f326b19ef6ab51a40038ee2ddd3296454f228"
resolved-ref: "8a7070f533e63dd150edae99476f6853bfb25913" resolved-ref: "9d4f326b19ef6ab51a40038ee2ddd3296454f228"
url: "https://github.com/cypherstack/tezart.git" url: "https://github.com/cypherstack/tezart.git"
source: git source: git
version: "2.0.5" version: "2.0.5"

View file

@ -166,7 +166,7 @@ dependencies:
tezart: tezart:
git: git:
url: https://github.com/cypherstack/tezart.git url: https://github.com/cypherstack/tezart.git
ref: 8a7070f533e63dd150edae99476f6853bfb25913 ref: 1fb2669e2b530367a449217e952f220d5e667043
socks5_proxy: ^1.0.3+dev.3 socks5_proxy: ^1.0.3+dev.3
convert: ^3.1.1 convert: ^3.1.1
flutter_hooks: ^0.20.3 flutter_hooks: ^0.20.3