mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 09:17:35 +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:
|
||||
await removeMoneroWorld(sharedPreferences: sharedPreferences, nodes: nodes);
|
||||
break;
|
||||
case 41:
|
||||
await addTronNodeList(nodes: nodes);
|
||||
await replaceTronDefaultNode(sharedPreferences: sharedPreferences, nodes: nodes);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1217,7 +1220,7 @@ Future<void> changeSolanaCurrentNodeToDefault(
|
|||
Future<void> addTronNodeList({required Box<Node> nodes}) async {
|
||||
final nodeList = await loadDefaultTronNodes();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ Future<void> initializeAppConfigs() async {
|
|||
transactionDescriptions: transactionDescriptions,
|
||||
secureStorage: secureStorage,
|
||||
anonpayInvoiceInfo: anonpayInvoiceInfo,
|
||||
initialMigrationVersion: 40,
|
||||
initialMigrationVersion: 41,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue