diff --git a/lib/entities/default_settings_migration.dart b/lib/entities/default_settings_migration.dart index 802ad0184..83d60930d 100644 --- a/lib/entities/default_settings_migration.dart +++ b/lib/entities/default_settings_migration.dart @@ -249,6 +249,9 @@ Future 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 changeSolanaCurrentNodeToDefault( Future addTronNodeList({required Box 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); } } diff --git a/lib/main.dart b/lib/main.dart index 32a6397c2..3dc4edf0a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -187,7 +187,7 @@ Future initializeAppConfigs() async { transactionDescriptions: transactionDescriptions, secureStorage: secureStorage, anonpayInvoiceInfo: anonpayInvoiceInfo, - initialMigrationVersion: 40, + initialMigrationVersion: 41, ); }