mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49: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
|
useSSL: true
|
||||||
-
|
-
|
||||||
uri: btc-electrum.cakewallet.com:50002
|
uri: btc-electrum.cakewallet.com:50002
|
||||||
|
useSSL: true
|
||||||
isDefault: true
|
isDefault: true
|
||||||
-
|
-
|
||||||
uri: electrs.cakewallet.com:50001
|
uri: electrs.cakewallet.com:50001
|
||||||
|
|
|
@ -256,6 +256,9 @@ Future<void> defaultSettingsMigration(
|
||||||
await _addSethNode(nodes, sharedPreferences);
|
await _addSethNode(nodes, sharedPreferences);
|
||||||
await updateTronNodesWithNowNodes(sharedPreferences: sharedPreferences, nodes: nodes);
|
await updateTronNodesWithNowNodes(sharedPreferences: sharedPreferences, nodes: nodes);
|
||||||
break;
|
break;
|
||||||
|
case 42:
|
||||||
|
updateBtcElectrumNodeToUseSSL(nodes, sharedPreferences);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -270,6 +273,15 @@ Future<void> defaultSettingsMigration(
|
||||||
await sharedPreferences.setInt(PreferencesKey.currentDefaultSettingsMigrationVersion, version);
|
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) {
|
void _deselectQuantex(SharedPreferences sharedPreferences) {
|
||||||
final Map<String, dynamic> exchangeProvidersSelection =
|
final Map<String, dynamic> exchangeProvidersSelection =
|
||||||
json.decode(sharedPreferences.getString(PreferencesKey.exchangeProvidersSelection) ?? "{}")
|
json.decode(sharedPreferences.getString(PreferencesKey.exchangeProvidersSelection) ?? "{}")
|
||||||
|
|
|
@ -192,7 +192,7 @@ Future<void> initializeAppConfigs() async {
|
||||||
transactionDescriptions: transactionDescriptions,
|
transactionDescriptions: transactionDescriptions,
|
||||||
secureStorage: secureStorage,
|
secureStorage: secureStorage,
|
||||||
anonpayInvoiceInfo: anonpayInvoiceInfo,
|
anonpayInvoiceInfo: anonpayInvoiceInfo,
|
||||||
initialMigrationVersion: 41,
|
initialMigrationVersion: 42,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue