mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 12:09:43 +00:00
forgot to add to commit
This commit is contained in:
parent
507b5541f6
commit
884a53f607
2 changed files with 9 additions and 8 deletions
|
@ -134,6 +134,8 @@ abstract class ElectrumWalletBase
|
|||
|
||||
void Function(FlutterErrorDetails)? _onError;
|
||||
|
||||
bool torOnly = false;
|
||||
|
||||
Future<void> init() async {
|
||||
await walletAddresses.init();
|
||||
await transactionHistory.init();
|
||||
|
@ -163,12 +165,16 @@ abstract class ElectrumWalletBase
|
|||
}
|
||||
}
|
||||
|
||||
void setTorOnly(bool value) {
|
||||
torOnly = value;
|
||||
}
|
||||
|
||||
@action
|
||||
@override
|
||||
Future<void> connectToNode({required Node node}) async {
|
||||
try {
|
||||
// we can't connect over tor in this wallet type (yet):
|
||||
if (node.connectOverTorOnly) {
|
||||
if (torOnly) {
|
||||
syncStatus = FailedSyncStatus();
|
||||
return;
|
||||
}
|
||||
|
@ -607,8 +613,6 @@ abstract class ElectrumWalletBase
|
|||
electrumClient.getHistory(scriptHash).then((history) => {scriptHash: history}));
|
||||
final historyResults = await Future.wait(histories);
|
||||
|
||||
|
||||
|
||||
historyResults.forEach((history) {
|
||||
history.entries.forEach((historyItem) {
|
||||
if (historyItem.value.isNotEmpty) {
|
||||
|
@ -628,7 +632,6 @@ abstract class ElectrumWalletBase
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
addressHashes.forEach((sh, addressRecord) {
|
||||
addressRecord.txCount = newTxCounts[sh] ?? 0;
|
||||
});
|
||||
|
|
|
@ -63,8 +63,6 @@ class Node extends HiveObject with Keyable {
|
|||
@HiveField(6)
|
||||
String? socksProxyAddress;
|
||||
|
||||
bool connectOverTorOnly = false;
|
||||
|
||||
bool get isSSL => useSSL ?? false;
|
||||
|
||||
bool get useSocksProxy => socksProxyAddress == null ? false : socksProxyAddress!.isNotEmpty;
|
||||
|
|
Loading…
Reference in a new issue