aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/manager.go
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/manager.go')
-rw-r--r--accounts/manager.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/accounts/manager.go b/accounts/manager.go
index 12a5bfcd9..78ddb1368 100644
--- a/accounts/manager.go
+++ b/accounts/manager.go
@@ -96,9 +96,10 @@ func (am *Manager) update() {
case event := <-am.updates:
// Wallet event arrived, update local cache
am.lock.Lock()
- if event.Arrive {
+ switch event.Kind {
+ case WalletArrived:
am.wallets = merge(am.wallets, event.Wallet)
- } else {
+ case WalletDropped:
am.wallets = drop(am.wallets, event.Wallet)
}
am.lock.Unlock()