Skip to content

Commit 1d890c8

Browse files
committed
backend: enabling keystore watchonly should not modify the hidden accounts
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.
1 parent 1413378 commit 1d890c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/backend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ func (backend *Backend) SetWatchonly(rootFingerprint []byte, watchonly bool) err
920920
return backend.AccountSetWatch(
921921
func(account *config.Account) bool {
922922
// Apply to each currently loaded account.
923-
return accounts.lookup(account.Code) != nil
923+
return !account.HiddenBecauseUnused && accounts.lookup(account.Code) != nil
924924
},
925925
&t,
926926
)

0 commit comments

Comments
 (0)