mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
fix: Issue with nownodes on older wallets (#1750)
Some checks are pending
Cache Dependencies / test (push) Waiting to run
Some checks are pending
Cache Dependencies / test (push) Waiting to run
This commit is contained in:
parent
c3019b91cd
commit
b56dcaca1c
1 changed files with 14 additions and 0 deletions
|
@ -254,6 +254,7 @@ Future<void> defaultSettingsMigration(
|
|||
case 41:
|
||||
_deselectQuantex(sharedPreferences);
|
||||
await _addSethNode(nodes, sharedPreferences);
|
||||
await updateTronNodesWithNowNodes(sharedPreferences: sharedPreferences, nodes: nodes);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -1317,3 +1318,16 @@ Future<void> removeMoneroWorld(
|
|||
await changeMoneroCurrentNodeToDefault(sharedPreferences: sharedPreferences, nodes: nodes);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> updateTronNodesWithNowNodes({
|
||||
required SharedPreferences sharedPreferences,
|
||||
required Box<Node> nodes,
|
||||
}) async {
|
||||
final tronNowNodesUri = 'trx.nownodes.io';
|
||||
|
||||
if (nodes.values.any((node) => node.uriRaw == tronNowNodesUri)) return;
|
||||
|
||||
await nodes.add(Node(uri: tronNowNodesUri, type: WalletType.tron));
|
||||
|
||||
await replaceTronDefaultNode(sharedPreferences: sharedPreferences, nodes: nodes);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue