Change default haven node to nodes.havenprotocol.org:443

wownero
M 2 years ago
parent 08ffaaa69f
commit aacc9014ea

@ -1,6 +1,4 @@
-
uri: vault.havenprotocol.org:443
login: super
password: super
uri: nodes.havenprotocol.org:443
useSSL: true
is_default: true

@ -22,7 +22,7 @@ import 'package:encrypt/encrypt.dart' as encrypt;
const newCakeWalletMoneroUri = 'xmr-node.cakewallet.com:18081';
const cakeWalletBitcoinElectrumUri = '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(
{@required int version,
@ -128,6 +128,10 @@ Future defaultSettingsMigration(
await checkCurrentNodes(nodes, sharedPreferences);
break;
case 17:
await changeDefaultHavenNode(nodes);
break;
default:
break;
}
@ -452,3 +456,14 @@ Future<void> resetBitcoinElectrumServer(
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,
transactionDescriptions: transactionDescriptions,
secureStorage: secureStorage,
initialMigrationVersion: 16);
initialMigrationVersion: 17);
runApp(App());
} catch (e) {
runApp(MaterialApp(

Loading…
Cancel
Save