Skip to content

Commit

Permalink
Bug fixes for handling imported accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
bbedward committed Apr 22, 2024
1 parent bf6a9fd commit 3ca896d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/appstate_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -277,23 +277,22 @@ class StateContainerState extends State<StateContainer> {
} else {
// Remove account
updateRecentlyUsedAccounts().then((_) {
if (event.account.index == selectedAccount.index &&
recentLast != null) {
if (event.account.id == selectedAccount.id && recentLast != null) {
sl.get<DBHelper>().changeAccount(recentLast);
setState(() {
selectedAccount = recentLast;
});
EventTaxiImpl.singleton()
.fire(AccountChangedEvent(account: recentLast, noPop: true));
} else if (event.account.index == selectedAccount.index &&
} else if (event.account.id == selectedAccount.id &&
recentSecondLast != null) {
sl.get<DBHelper>().changeAccount(recentSecondLast);
setState(() {
selectedAccount = recentSecondLast;
});
EventTaxiImpl.singleton().fire(
AccountChangedEvent(account: recentSecondLast, noPop: true));
} else if (event.account.index == selectedAccount.index) {
} else if (event.account.id == selectedAccount.id) {
sl.get<DBHelper>().getMainAccount().then((mainAccount) {
sl.get<DBHelper>().changeAccount(mainAccount);
setState(() {
Expand Down Expand Up @@ -758,6 +757,7 @@ class StateContainerState extends State<StateContainer> {
await sl.get<DBHelper>().changeToDefaultAccount();
return null;
}
return privKey;
}
return NanoUtil.seedToPrivate(
await sl.get<Vault>().getSeed(), selectedAccount.index);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: A new Flutter project.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 2.5.0+98
version: 2.5.1+99

environment:
sdk: ">=2.11.99 <3.0.0"
Expand Down

0 comments on commit 3ca896d

Please sign in to comment.