feat: wallet - emoji and color (#4322)

* feat: init wallet with emoji
This commit is contained in:
Omar Basem 2023-12-06 14:47:38 +04:00 committed by GitHub
parent ee8d8473e2
commit 1096b16336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 1 deletions

View File

@ -759,6 +759,7 @@ func TestLoginAccount(t *testing.T) {
createAccountRequest := &requests.CreateAccount{
DisplayName: "some-display-name",
CustomizationColor: "#ffffff",
Emoji: "some",
Password: password,
BackupDisabledDataDir: tmpdir,
NetworkID: 1,
@ -1303,6 +1304,7 @@ func TestCreateWallet(t *testing.T) {
createAccountRequest := &requests.CreateAccount{
DisplayName: "some-display-name",
CustomizationColor: "#ffffff",
Emoji: "emoji",
Password: password,
BackupDisabledDataDir: tmpdir,
NetworkID: 1,
@ -1366,6 +1368,7 @@ func TestSetFleet(t *testing.T) {
BackupDisabledDataDir: tmpdir,
NetworkID: 1,
LogFilePath: tmpdir + "/log",
Emoji: "some",
}
c := make(chan interface{}, 10)
signal.SetMobileSignalHandler(func(data []byte) {

View File

@ -29,6 +29,7 @@ func TestCreateAccountAndLogin(t *testing.T) {
"verifyTransactionChainID":1,
"currentNetwork":"mainnet_rpc",
"customizationColor":"blue",
"emoji": "some",
"previewPrivacy":true,
"verifyTransactionURL":"https://eth-archival.gateway.pokt.network/v1/lb/3ef2018191814b7e1009b8d9",
"imagePath":null,

View File

@ -1372,7 +1372,8 @@ func (b *GethStatusBackend) generateOrImportAccount(mnemonic string, customizati
PublicKey: types.Hex2Bytes(walletDerivedAccount.PublicKey),
KeyUID: info.KeyUID,
Address: types.HexToAddress(walletDerivedAccount.Address),
ColorID: "",
ColorID: multiacccommon.CustomizationColor(request.CustomizationColor),
Emoji: request.Emoji,
Wallet: true,
Path: pathDefaultWallet,
Name: walletAccountDefaultName,

View File

@ -20,6 +20,7 @@ type CreateAccount struct {
Password string `json:"password"`
ImagePath string `json:"imagePath"`
CustomizationColor string `json:"customizationColor"`
Emoji string `json:"emoji"`
WakuV2Nameserver *string `json:"wakuV2Nameserver"`
WakuV2LightClient bool `json:"wakuV2LightClient"`