aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.