diff --git a/accounts/keystore/keystore.go b/accounts/keystore/keystore.go index 2918047ccd4b227de0ba4f43ae273266b3e2f8d2..434e035048b326cc5ec5dd56ce29f4fbb2dce917 100644 --- a/accounts/keystore/keystore.go +++ b/accounts/keystore/keystore.go @@ -137,8 +137,10 @@ func (ks *KeyStore) refreshWallets() { accs := ks.cache.accounts() // Transform the current list of wallets into the new one - wallets := make([]accounts.Wallet, 0, len(accs)) - events := []accounts.WalletEvent{} + var ( + wallets = make([]accounts.Wallet, 0, len(accs)) + events []accounts.WalletEvent + ) for _, account := range accs { // Drop wallets while they were in front of the next account diff --git a/accounts/usbwallet/hub.go b/accounts/usbwallet/hub.go index 640320bc91434814ff79acf47b735ef277fc1bc1..a91340b4fc10d593e6c56a25e929a914fead3f94 100644 --- a/accounts/usbwallet/hub.go +++ b/accounts/usbwallet/hub.go @@ -150,8 +150,10 @@ func (hub *Hub) refreshWallets() { // Transform the current list of wallets into the new one hub.stateLock.Lock() - wallets := make([]accounts.Wallet, 0, len(devices)) - events := []accounts.WalletEvent{} + var ( + wallets = make([]accounts.Wallet, 0, len(devices)) + events []accounts.WalletEvent + ) for _, device := range devices { url := accounts.URL{Scheme: hub.scheme, Path: device.Path}