mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
re-add tron nodes for existing users
This commit is contained in:
parent
fc7bea6830
commit
ea0ba163de
2 changed files with 5 additions and 2 deletions
|
@ -249,6 +249,9 @@ Future<void> defaultSettingsMigration(
|
||||||
case 40:
|
case 40:
|
||||||
await removeMoneroWorld(sharedPreferences: sharedPreferences, nodes: nodes);
|
await removeMoneroWorld(sharedPreferences: sharedPreferences, nodes: nodes);
|
||||||
break;
|
break;
|
||||||
|
case 41:
|
||||||
|
await addTronNodeList(nodes: nodes);
|
||||||
|
await replaceTronDefaultNode(sharedPreferences: sharedPreferences, nodes: nodes);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1217,7 +1220,7 @@ Future<void> changeSolanaCurrentNodeToDefault(
|
||||||
Future<void> addTronNodeList({required Box<Node> nodes}) async {
|
Future<void> addTronNodeList({required Box<Node> nodes}) async {
|
||||||
final nodeList = await loadDefaultTronNodes();
|
final nodeList = await loadDefaultTronNodes();
|
||||||
for (var node in nodeList) {
|
for (var node in nodeList) {
|
||||||
if (nodes.values.firstWhereOrNull((element) => element.uriRaw == node.uriRaw) == null) {
|
if (!nodes.values.any((element) => element.uriRaw == node.uriRaw)) {
|
||||||
await nodes.add(node);
|
await nodes.add(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ Future<void> initializeAppConfigs() async {
|
||||||
transactionDescriptions: transactionDescriptions,
|
transactionDescriptions: transactionDescriptions,
|
||||||
secureStorage: secureStorage,
|
secureStorage: secureStorage,
|
||||||
anonpayInvoiceInfo: anonpayInvoiceInfo,
|
anonpayInvoiceInfo: anonpayInvoiceInfo,
|
||||||
initialMigrationVersion: 40,
|
initialMigrationVersion: 41,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue