mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
Change default haven node to nodes.havenprotocol.org:443
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ Future<void> main() async {
|
||||
exchangeTemplates: exchangeTemplates,
|
||||
transactionDescriptions: transactionDescriptions,
|
||||
secureStorage: secureStorage,
|
||||
initialMigrationVersion: 16);
|
||||
initialMigrationVersion: 17);
|
||||
runApp(App());
|
||||
} catch (e) {
|
||||
runApp(MaterialApp(
|
||||
|
||||
Reference in New Issue
Block a user