mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
enable ssl for btc-electrum (#1765)
Some checks failed
Cache Dependencies / test (push) Has been cancelled
Some checks failed
Cache Dependencies / test (push) Has been cancelled
This commit is contained in:
parent
0a1e32c363
commit
20efba43cb
3 changed files with 14 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
useSSL: true
|
||||
-
|
||||
uri: btc-electrum.cakewallet.com:50002
|
||||
useSSL: true
|
||||
isDefault: true
|
||||
-
|
||||
uri: electrs.cakewallet.com:50001
|
||||
|
|
|
@ -256,6 +256,9 @@ Future<void> defaultSettingsMigration(
|
|||
await _addSethNode(nodes, sharedPreferences);
|
||||
await updateTronNodesWithNowNodes(sharedPreferences: sharedPreferences, nodes: nodes);
|
||||
break;
|
||||
case 42:
|
||||
updateBtcElectrumNodeToUseSSL(nodes, sharedPreferences);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -270,6 +273,15 @@ Future<void> defaultSettingsMigration(
|
|||
await sharedPreferences.setInt(PreferencesKey.currentDefaultSettingsMigrationVersion, version);
|
||||
}
|
||||
|
||||
void updateBtcElectrumNodeToUseSSL(Box<Node> nodes, SharedPreferences sharedPreferences) {
|
||||
final btcElectrumNode = nodes.values.firstWhereOrNull((element) => element.uriRaw == newCakeWalletBitcoinUri);
|
||||
|
||||
if (btcElectrumNode != null) {
|
||||
btcElectrumNode.useSSL = true;
|
||||
btcElectrumNode.save();
|
||||
}
|
||||
}
|
||||
|
||||
void _deselectQuantex(SharedPreferences sharedPreferences) {
|
||||
final Map<String, dynamic> exchangeProvidersSelection =
|
||||
json.decode(sharedPreferences.getString(PreferencesKey.exchangeProvidersSelection) ?? "{}")
|
||||
|
|
|
@ -192,7 +192,7 @@ Future<void> initializeAppConfigs() async {
|
|||
transactionDescriptions: transactionDescriptions,
|
||||
secureStorage: secureStorage,
|
||||
anonpayInvoiceInfo: anonpayInvoiceInfo,
|
||||
initialMigrationVersion: 41,
|
||||
initialMigrationVersion: 42,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue