mirror of
https://github.com/status-im/status-go.git
synced 2025-02-16 16:56:53 +00:00
Make image path optional
This commit is contained in:
parent
ba2aa3f83e
commit
6775e79920
@ -795,6 +795,7 @@ func (b *GethStatusBackend) CreateAccountAndLogin(request *requests.CreateAccoun
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if request.ImagePath != "" {
|
||||||
iis, err := images.GenerateIdentityImages(request.ImagePath, 0, 0, 1000, 1000)
|
iis, err := images.GenerateIdentityImages(request.ImagePath, 0, 0, 1000, 1000)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -804,6 +805,7 @@ func (b *GethStatusBackend) CreateAccountAndLogin(request *requests.CreateAccoun
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ import (
|
|||||||
|
|
||||||
var ErrCreateAccountInvalidDisplayName = errors.New("create-account: invalid display name")
|
var ErrCreateAccountInvalidDisplayName = errors.New("create-account: invalid display name")
|
||||||
var ErrCreateAccountInvalidPassword = errors.New("create-account: invalid password")
|
var ErrCreateAccountInvalidPassword = errors.New("create-account: invalid password")
|
||||||
var ErrCreateAccountInvalidImagePath = errors.New("create-account: invalid image path")
|
|
||||||
var ErrCreateAccountInvalidColor = errors.New("create-account: invalid color")
|
var ErrCreateAccountInvalidColor = errors.New("create-account: invalid color")
|
||||||
var ErrCreateAccountInvalidRootKeystoreDir = errors.New("create-account: invalid root keystore directory")
|
var ErrCreateAccountInvalidRootKeystoreDir = errors.New("create-account: invalid root keystore directory")
|
||||||
var ErrCreateAccountInvalidBackupDisabledDataDir = errors.New("create-account: invalid backup disabled data directory")
|
var ErrCreateAccountInvalidBackupDisabledDataDir = errors.New("create-account: invalid backup disabled data directory")
|
||||||
@ -42,10 +41,6 @@ func (c *CreateAccount) Validate() error {
|
|||||||
return ErrCreateAccountInvalidPassword
|
return ErrCreateAccountInvalidPassword
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(c.ImagePath) == 0 {
|
|
||||||
return ErrCreateAccountInvalidImagePath
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(c.Color) == 0 {
|
if len(c.Color) == 0 {
|
||||||
return ErrCreateAccountInvalidColor
|
return ErrCreateAccountInvalidColor
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user