mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-24 20:37:17 +00:00
Return an error when wallet is nil rather than panic (#6875)
This commit is contained in:
parent
859e59b6f7
commit
bc883aab9e
@ -58,6 +58,9 @@ func CreateWallet(cliCtx *cli.Context) (*Wallet, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func createDirectKeymanagerWallet(cliCtx *cli.Context, wallet *Wallet) error {
|
func createDirectKeymanagerWallet(cliCtx *cli.Context, wallet *Wallet) error {
|
||||||
|
if wallet == nil {
|
||||||
|
return errors.New("nil wallet")
|
||||||
|
}
|
||||||
if err := wallet.SaveWallet(); err != nil {
|
if err := wallet.SaveWallet(); err != nil {
|
||||||
return errors.Wrap(err, "could not save wallet to disk")
|
return errors.Wrap(err, "could not save wallet to disk")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user