mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 09:17:35 +00:00
Change default haven node to nodes.havenprotocol.org:443
This commit is contained in:
parent
08ffaaa69f
commit
aacc9014ea
3 changed files with 18 additions and 5 deletions
|
@ -1,6 +1,4 @@
|
||||||
-
|
-
|
||||||
uri: vault.havenprotocol.org:443
|
uri: nodes.havenprotocol.org:443
|
||||||
login: super
|
|
||||||
password: super
|
|
||||||
useSSL: true
|
useSSL: true
|
||||||
is_default: true
|
is_default: true
|
|
@ -22,7 +22,7 @@ import 'package:encrypt/encrypt.dart' as encrypt;
|
||||||
const newCakeWalletMoneroUri = 'xmr-node.cakewallet.com:18081';
|
const newCakeWalletMoneroUri = 'xmr-node.cakewallet.com:18081';
|
||||||
const cakeWalletBitcoinElectrumUri = 'electrum.cakewallet.com:50002';
|
const cakeWalletBitcoinElectrumUri = 'electrum.cakewallet.com:50002';
|
||||||
const cakeWalletLitecoinElectrumUri = 'ltc-electrum.cakewallet.com:50002';
|
const cakeWalletLitecoinElectrumUri = 'ltc-electrum.cakewallet.com:50002';
|
||||||
const havenDefaultNodeUri = 'vault.havenprotocol.org:443';
|
const havenDefaultNodeUri = 'nodes.havenprotocol.org:443';
|
||||||
|
|
||||||
Future defaultSettingsMigration(
|
Future defaultSettingsMigration(
|
||||||
{@required int version,
|
{@required int version,
|
||||||
|
@ -128,6 +128,10 @@ Future defaultSettingsMigration(
|
||||||
await checkCurrentNodes(nodes, sharedPreferences);
|
await checkCurrentNodes(nodes, sharedPreferences);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 17:
|
||||||
|
await changeDefaultHavenNode(nodes);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -452,3 +456,14 @@ Future<void> resetBitcoinElectrumServer(
|
||||||
|
|
||||||
await oldElectrumServer?.delete();
|
await oldElectrumServer?.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> changeDefaultHavenNode(
|
||||||
|
Box<Node> nodeSource) async {
|
||||||
|
const previousHavenDefaultNodeUri = 'vault.havenprotocol.org:443';
|
||||||
|
final havenNodes = nodeSource.values.where(
|
||||||
|
(node) => node.uriRaw == previousHavenDefaultNodeUri);
|
||||||
|
havenNodes.forEach((node) async {
|
||||||
|
node.uriRaw = havenDefaultNodeUri;
|
||||||
|
await node.save();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -126,7 +126,7 @@ Future<void> main() async {
|
||||||
exchangeTemplates: exchangeTemplates,
|
exchangeTemplates: exchangeTemplates,
|
||||||
transactionDescriptions: transactionDescriptions,
|
transactionDescriptions: transactionDescriptions,
|
||||||
secureStorage: secureStorage,
|
secureStorage: secureStorage,
|
||||||
initialMigrationVersion: 16);
|
initialMigrationVersion: 17);
|
||||||
runApp(App());
|
runApp(App());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
runApp(MaterialApp(
|
runApp(MaterialApp(
|
||||||
|
|
Loading…
Reference in a new issue