Skip to content

Commit 52b9f63

Browse files
committed
backend/accounts: bring back watchonly account immediately if unhidden
In manage accounts in the edit button, one can hide and account. The account is hidden immediately, but the dialog remains open, so the user can unhide it. This commit changes the backend to bring back the account immediately in this case.
1 parent b54eac5 commit 52b9f63

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

backend/accounts.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ func copyBool(b *bool) *bool {
493493
// AccountSetWatch sets the account's persisted watch flag to `watch`. Set to `true` if the account
494494
// should be loaded even if its keystore is not connected.
495495
// If `watch` is set to `false`, the account is unloaded and the frontend notified.
496+
// If `watch` is set to `true`, the account is loaded (if the global watchonly flag is enabled) and the frontend notified.
496497
func (backend *Backend) AccountSetWatch(filter func(*config.Account) bool, watch *bool) error {
497498
err := backend.config.ModifyAccountsConfig(func(accountsConfig *config.AccountsConfig) error {
498499
for _, acct := range accountsConfig.Accounts {
@@ -524,10 +525,8 @@ func (backend *Backend) AccountSetWatch(filter func(*config.Account) bool, watch
524525
}
525526
}
526527

527-
if watch == nil || !*watch {
528-
backend.initAccounts(false)
529-
backend.emitAccountsStatusChanged()
530-
}
528+
backend.initAccounts(false)
529+
backend.emitAccountsStatusChanged()
531530
return nil
532531
}
533532

0 commit comments

Comments
 (0)