aboutsummaryrefslogtreecommitdiffstats
path: root/accounts
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-06-17 01:49:45 +0800
committerGuillaume Ballet <gballet@gmail.com>2019-04-08 19:19:37 +0800
commita900e80a89395d85aa5695759f389a4d7cd1b8ba (patch)
tree837f57775245359355b00576558be61e2a89277c /accounts
parent7d5886dcf4412b9c4459d67ab51d61e7ce30421d (diff)
downloadgo-tangerine-a900e80a89395d85aa5695759f389a4d7cd1b8ba.tar
go-tangerine-a900e80a89395d85aa5695759f389a4d7cd1b8ba.tar.gz
go-tangerine-a900e80a89395d85aa5695759f389a4d7cd1b8ba.tar.bz2
go-tangerine-a900e80a89395d85aa5695759f389a4d7cd1b8ba.tar.lz
go-tangerine-a900e80a89395d85aa5695759f389a4d7cd1b8ba.tar.xz
go-tangerine-a900e80a89395d85aa5695759f389a4d7cd1b8ba.tar.zst
go-tangerine-a900e80a89395d85aa5695759f389a4d7cd1b8ba.zip
accounts/scwallet: fix crypto API change
Diffstat (limited to 'accounts')
-rw-r--r--accounts/scwallet/wallet.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/accounts/scwallet/wallet.go b/accounts/scwallet/wallet.go
index 3327e7f63..548bc9e2e 100644
--- a/accounts/scwallet/wallet.go
+++ b/accounts/scwallet/wallet.go
@@ -907,7 +907,11 @@ func (s *Session) derive(path accounts.DerivationPath) (accounts.Account, error)
return accounts.Account{}, err
}
}
- return s.Wallet.makeAccount(crypto.PubkeyToAddress(*crypto.ToECDSAPub(pubkey)), path), nil
+ pub, err := crypto.UnmarshalPubkey(pubkey)
+ if err != nil {
+ return accounts.Account{}, err
+ }
+ return s.Wallet.makeAccount(crypto.PubkeyToAddress(*pub), path), nil
}
// keyDerivationInfo contains information on the current key derivation step.