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