diff --git a/VERSION b/VERSION index ab05b5cba..c7b3888d1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.160.0 +0.160.1 diff --git a/api/geth_backend.go b/api/geth_backend.go index a9f2b47e9..901a5966c 100644 --- a/api/geth_backend.go +++ b/api/geth_backend.go @@ -12,6 +12,8 @@ import ( "sync" "time" + "github.com/status-im/status-go/images" + "github.com/imdario/mergo" "github.com/ethereum/go-ethereum/common/hexutil" @@ -25,7 +27,6 @@ import ( "github.com/status-im/status-go/connection" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" - "github.com/status-im/status-go/images" "github.com/status-im/status-go/logutils" "github.com/status-im/status-go/multiaccounts" "github.com/status-im/status-go/multiaccounts/accounts" @@ -1028,6 +1029,13 @@ func (b *GethStatusBackend) generateOrImportAccount(mnemonic string, request *re CustomizationColor: common.CustomizationColor(request.CustomizationColor), KDFIterations: sqlite.ReducedKDFIterationsNumber, } + if request.ImagePath != "" { + iis, err := images.GenerateIdentityImages(request.ImagePath, 0, 0, 1000, 1000) + if err != nil { + return err + } + account.Images = iis + } settings, err := defaultSettings(info, derivedAddresses, nil) if err != nil { @@ -1074,25 +1082,13 @@ func (b *GethStatusBackend) generateOrImportAccount(mnemonic string, request *re Path: pathDefaultChat, } - accounts := []*accounts.Account{walletAccount, chatAccount} - err = b.StartNodeWithAccountAndInitialConfig(account, request.Password, *settings, nodeConfig, accounts) + subAccounts := []*accounts.Account{walletAccount, chatAccount} + err = b.StartNodeWithAccountAndInitialConfig(account, request.Password, *settings, nodeConfig, subAccounts) if err != nil { b.log.Error("start node", err) 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 - } - } - return nil }