Skip to content

Commit

Permalink
disable PingCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
vekamo committed Nov 13, 2024
1 parent 9d04e47 commit 68a6769
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
2 changes: 1 addition & 1 deletion crypto_plugins/flutter_libmwc
6 changes: 3 additions & 3 deletions lib/utilities/default_mwcmqs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ abstract class DefaultMwcMqs {
static List<String> get defaultIds => ['americas', 'asia', 'europe'];

static MwcMqsServerModel get americas => MwcMqsServerModel(
host: 'MwcMqs.stackwallet.com',
host: 'mqs.mwc.mw',
port: 443,
name: 'Americas',
id: 'americas',
Expand All @@ -28,7 +28,7 @@ abstract class DefaultMwcMqs {
);

static MwcMqsServerModel get asia => MwcMqsServerModel(
host: 'MwcMqs.hyperbig.com',
host: 'mqs.mwc.mw',
port: 443,
name: 'Asia',
id: 'asia',
Expand All @@ -39,7 +39,7 @@ abstract class DefaultMwcMqs {
);

static MwcMqsServerModel get europe => MwcMqsServerModel(
host: 'MwcMqs.fastepic.eu',
host: 'mqs.mwc.mw',
port: 443,
name: 'Europe',
id: 'europe',
Expand Down
43 changes: 22 additions & 21 deletions lib/wallets/wallet/impl/mimblewimblecoin_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ class MimblewimblecoinWallet extends Bip39Wallet {
);

//Store MwcMqs address info
await _generateAndStoreReceivingAddressForIndex(0);
// await _generateAndStoreReceivingAddressForIndex(0);

// subtract a couple days to ensure we have a buffer for SWB
final bufferedCreateHeight = _calculateRestoreHeightFrom(
Expand Down Expand Up @@ -754,9 +754,9 @@ class MimblewimblecoinWallet extends Bip39Wallet {
value: walletOpen,
);

await _generateAndStoreReceivingAddressForIndex(
mimblewimblecoinData.receivingIndex,
);
// await _generateAndStoreReceivingAddressForIndex(
// mimblewimblecoinData.receivingIndex,
// );
}
});

Expand Down Expand Up @@ -799,7 +799,7 @@ class MimblewimblecoinWallet extends Bip39Wallet {

// this will always be zero????
final int curAdd = await _getCurrentIndex();
await _generateAndStoreReceivingAddressForIndex(curAdd);
// await _generateAndStoreReceivingAddressForIndex(curAdd);

await _startScans();

Expand Down Expand Up @@ -1087,22 +1087,23 @@ class MimblewimblecoinWallet extends Bip39Wallet {

@override
Future<bool> pingCheck() async {
try {
final node = nodeService.getPrimaryNodeFor(currency: cryptoCurrency);

// force unwrap optional as we want connection test to fail if wallet
// wasn't initialized or mwcmqs node was set to null
return await testMwcNodeConnection(
NodeFormData()
..host = node!.host
..useSSL = node.useSSL
..port = node.port,
) !=
null;
} catch (e, s) {
Logging.instance.log("$e\n$s", level: LogLevel.Info);
return false;
}
return true;
//try {
// final node = nodeService.getPrimaryNodeFor(currency: cryptoCurrency);
//
// // force unwrap optional as we want connection test to fail if wallet
// // wasn't initialized or mwcmqs node was set to null
// return await testMwcNodeConnection(
// NodeFormData()
// ..host = node!.host
// ..useSSL = node.useSSL
// ..port = node.port,
// ) !=
// null;
//} catch (e, s) {
// Logging.instance.log("$e\n$s", level: LogLevel.Info);
// return false;
//}
}

@override
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ packages:
source: hosted
version: "2.4.4"
frontend_server_client:
dependency: "direct dev"
dependency: transitive
description:
name: frontend_server_client
sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694
Expand Down

0 comments on commit 68a6769

Please sign in to comment.