diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-08-01 23:45:17 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-08-09 16:30:17 +0800 |
commit | db568a61e2a98880ab308bf2224aa34073dc7f39 (patch) | |
tree | 97da46661ad3002b6ff9f6dca07e3105da5a9c5a /accounts/manager.go | |
parent | 17ce0a37de5a2712a8bf9d58df705e718b3b2cd6 (diff) | |
download | dexon-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.gz dexon-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.zst dexon-db568a61e2a98880ab308bf2224aa34073dc7f39.zip |
accounts, console, internal: support trezor hardware wallet
Diffstat (limited to 'accounts/manager.go')
-rw-r--r-- | accounts/manager.go | 5 |
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() |