Skip to content

Commit

Permalink
backend: enabling keystore watchonly should not modify the hidden acc…
Browse files Browse the repository at this point in the history
…ounts

The automatically added accounts to be scanned in the background
should not be marked watchonly when the keystore watchonly setting is
enabled. Otherwise, if the accont receives funds, it would appear
automatically even if it was never visible before, even if the
keystore is not connected again.
  • Loading branch information
benma committed Dec 13, 2023
1 parent 1413378 commit 1d890c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ func (backend *Backend) SetWatchonly(rootFingerprint []byte, watchonly bool) err
return backend.AccountSetWatch(
func(account *config.Account) bool {
// Apply to each currently loaded account.
return accounts.lookup(account.Code) != nil
return !account.HiddenBecauseUnused && accounts.lookup(account.Code) != nil
},
&t,
)
Expand Down

0 comments on commit 1d890c8

Please sign in to comment.