mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-10 07:58:22 -05:00
Return an error when wallet is nil rather than panic (#6875)
This commit is contained in:
@@ -58,6 +58,9 @@ func CreateWallet(cliCtx *cli.Context) (*Wallet, error) {
|
||||
}
|
||||
|
||||
func createDirectKeymanagerWallet(cliCtx *cli.Context, wallet *Wallet) error {
|
||||
if wallet == nil {
|
||||
return errors.New("nil wallet")
|
||||
}
|
||||
if err := wallet.SaveWallet(); err != nil {
|
||||
return errors.Wrap(err, "could not save wallet to disk")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user