From a900e80a89395d85aa5695759f389a4d7cd1b8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Sat, 16 Jun 2018 20:49:45 +0300 Subject: accounts/scwallet: fix crypto API change --- accounts/scwallet/wallet.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'accounts') 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. -- cgit v1.2.3