aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-01-27 19:23:24 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-02-13 20:00:06 +0800
commit470b79385bcde3b4c999daf6a8debb00072ad967 (patch)
treeded5632f95a0fc11fe4b331f149d792a746b4bed
parent1ecf99bd0f332247df3a8976ae94e1b63b9d8a76 (diff)
downloaddexon-470b79385bcde3b4c999daf6a8debb00072ad967.tar
dexon-470b79385bcde3b4c999daf6a8debb00072ad967.tar.gz
dexon-470b79385bcde3b4c999daf6a8debb00072ad967.tar.bz2
dexon-470b79385bcde3b4c999daf6a8debb00072ad967.tar.lz
dexon-470b79385bcde3b4c999daf6a8debb00072ad967.tar.xz
dexon-470b79385bcde3b4c999daf6a8debb00072ad967.tar.zst
dexon-470b79385bcde3b4c999daf6a8debb00072ad967.zip
accounts/usbwallet: support Ledger app version <1.0.2
-rw-r--r--accounts/usbwallet/ledger.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/accounts/usbwallet/ledger.go b/accounts/usbwallet/ledger.go
index 8f502c58e..cc64ccb42 100644
--- a/accounts/usbwallet/ledger.go
+++ b/accounts/usbwallet/ledger.go
@@ -330,9 +330,13 @@ func (hub *LedgerHub) rescan() {
id := uint16(device.Bus)<<8 + uint16(device.Address)
hub.wallets[id] = wallet
- if wallet.resolveVersion() != nil || wallet.resolveAddress() != nil {
+ if wallet.resolveAddress() != nil {
glog.V(logger.Info).Infof("ledger wallet [%s] connected, Ethereum app not started", wallet.url)
} else {
+ // Try to resolve the Ethereum app's version, will fail prior to v1.0.2
+ if wallet.resolveVersion() != nil {
+ wallet.version = [3]byte{1, 0, 0} // Assume worst case, can't verify if v1.0.0 or v1.0.1
+ }
hub.accounts = append(hub.accounts, accounts.Account{
Address: wallet.address,
URL: wallet.url,