mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 06:12:55 +00:00
21 lines
385 B
Go
21 lines
385 B
Go
|
package requests
|
||
|
|
||
|
import (
|
||
|
"errors"
|
||
|
)
|
||
|
|
||
|
var ErrRestoreAccountInvalidMnemonic = errors.New("restore-account: invalid mnemonic")
|
||
|
|
||
|
type RestoreAccount struct {
|
||
|
Mnemonic string `json:"mnemonic"`
|
||
|
CreateAccount
|
||
|
}
|
||
|
|
||
|
func (c *RestoreAccount) Validate() error {
|
||
|
if len(c.Mnemonic) == 0 {
|
||
|
return ErrRestoreAccountInvalidMnemonic
|
||
|
}
|
||
|
|
||
|
return ValidateAccountCreationRequest(c.CreateAccount)
|
||
|
}
|