diff --git a/accounts/scwallet/wallet.go b/accounts/scwallet/wallet.go index 3327e7f638..548bc9e2e2 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.