aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/keystore/keystore.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-08-01 23:45:17 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-08-09 16:30:17 +0800
commitdb568a61e2a98880ab308bf2224aa34073dc7f39 (patch)
tree97da46661ad3002b6ff9f6dca07e3105da5a9c5a /accounts/keystore/keystore.go
parent17ce0a37de5a2712a8bf9d58df705e718b3b2cd6 (diff)
downloadgo-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.tar
go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.gz
go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.bz2
go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.lz
go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.xz
go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.zst
go-tangerine-db568a61e2a98880ab308bf2224aa34073dc7f39.zip
accounts, console, internal: support trezor hardware wallet
Diffstat (limited to 'accounts/keystore/keystore.go')
-rw-r--r--accounts/keystore/keystore.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/accounts/keystore/keystore.go b/accounts/keystore/keystore.go
index 9df7f2dd9..80ccd3741 100644
--- a/accounts/keystore/keystore.go
+++ b/accounts/keystore/keystore.go
@@ -143,14 +143,14 @@ func (ks *KeyStore) refreshWallets() {
for _, account := range accs {
// Drop wallets while they were in front of the next account
for len(ks.wallets) > 0 && ks.wallets[0].URL().Cmp(account.URL) < 0 {
- events = append(events, accounts.WalletEvent{Wallet: ks.wallets[0], Arrive: false})
+ events = append(events, accounts.WalletEvent{Wallet: ks.wallets[0], Kind: accounts.WalletDropped})
ks.wallets = ks.wallets[1:]
}
// If there are no more wallets or the account is before the next, wrap new wallet
if len(ks.wallets) == 0 || ks.wallets[0].URL().Cmp(account.URL) > 0 {
wallet := &keystoreWallet{account: account, keystore: ks}
- events = append(events, accounts.WalletEvent{Wallet: wallet, Arrive: true})
+ events = append(events, accounts.WalletEvent{Wallet: wallet, Kind: accounts.WalletArrived})
wallets = append(wallets, wallet)
continue
}
@@ -163,7 +163,7 @@ func (ks *KeyStore) refreshWallets() {
}
// Drop any leftover wallets and set the new batch
for _, wallet := range ks.wallets {
- events = append(events, accounts.WalletEvent{Wallet: wallet, Arrive: false})
+ events = append(events, accounts.WalletEvent{Wallet: wallet, Kind: accounts.WalletDropped})
}
ks.wallets = wallets
ks.mu.Unlock()