fix(wallet): naming of first and subsequent wallet accounts

Closes #12693
This commit is contained in:
Sale Djenic 2024-03-04 09:57:40 +01:00 committed by saledjenic
parent d12490ab18
commit cbfbce3f62
6 changed files with 9 additions and 8 deletions

View File

@ -256,7 +256,7 @@ QJsonArray AccountsService::prepareSubaccountJsonObject(const GeneratedMultiAcco
{"color", "#4360df"},
{"wallet", true},
{"path", Constants::General::PathDefaultWallet.get()},
{"name", "Status account"},
{"name", "Account 1"},
{"derived-from", account.address}},
QJsonObject{{"public-key", account.derivedAccounts.whisper.publicKey},
{"address", account.derivedAccounts.whisper.address},

View File

@ -25,6 +25,7 @@ export dto_generated_accounts
logScope:
topics = "accounts-service"
const DEFAULT_WALLET_ACCOUNT_NAME = "Account 1"
const PATHS = @[PATH_WALLET_ROOT, PATH_EIP_1581, PATH_WHISPER, PATH_DEFAULT_WALLET, PATH_ENCRYPTION]
const ACCOUNT_ALREADY_EXISTS_ERROR* = "account already exists"
const KDF_ITERATIONS* {.intdefine.} = 256_000
@ -240,7 +241,7 @@ QtObject:
"colorId": DEFAULT_COLORID_FOR_DEFAULT_WALLET_ACCOUNT,
"wallet": true,
"path": PATH_DEFAULT_WALLET,
"name": "Status account",
"name": DEFAULT_WALLET_ACCOUNT_NAME,
"derived-from": account.address,
"emoji": self.defaultWalletEmoji
},
@ -493,7 +494,7 @@ QtObject:
"colorId": DEFAULT_COLORID_FOR_DEFAULT_WALLET_ACCOUNT,
"wallet": true,
"path": PATH_DEFAULT_WALLET,
"name": "Status account",
"name": DEFAULT_WALLET_ACCOUNT_NAME,
"derived-from": address,
"emoji": self.defaultWalletEmoji,
},

View File

@ -1,7 +1,7 @@
from collections import namedtuple
from enum import Enum
DEFAULT_ACCOUNT_NAME = 'Status account'
DEFAULT_ACCOUNT_NAME = 'Account 1'
account_list_item = namedtuple('AccountListItem', ['name', 'color', 'emoji'])

View File

@ -14,8 +14,8 @@ Feature: Status Desktop Wallet Section Wallet Account Management
And the user edits an account with "<name>" to "<new_name>" with color "#<new_color>" and emoji "<new_emoji>"
Then the account is correctly displayed with "<new_name>" and "#<new_color>" and emoji unicode "<new_emoji_unicode>" in accounts list
Examples:
| name | new_name | new_color | new_emoji | new_emoji_unicode |
| Status account | MyPrimaryAccount | 216266 | sunglasses | 1f60e |
| name | new_name | new_color | new_emoji | new_emoji_unicode |
| Account 1 | MyPrimaryAccount | 216266 | sunglasses | 1f60e |
Scenario Outline: The user can add, edit and remove a watch only account
When the user adds a watch only account "<address>" with "<name>" color "#<color>" and emoji "<emoji>"

View File

@ -17,7 +17,7 @@ Feature: Status Desktop Transaction
@mayfail
Scenario Outline: The user sends a transaction
When the user sends a transaction to himself from account "Status account" of "<amount>" "<token>" on "<chain_name>" with password "qqqqqqqqqq"
When the user sends a transaction to himself from account "Account 1" of "<amount>" "<token>" on "<chain_name>" with password "qqqqqqqqqq"
Then the transaction is in progress
Examples:

View File

@ -102,7 +102,7 @@ Item {
id: accountName
objectName: "AddAccountPopup-AccountName"
anchors.horizontalCenter: parent.horizontalCenter
placeholderText: qsTr("Enter an account name...")
placeholderText: qsTr("Account name")
label: qsTr("Name")
charLimit: 20
text: root.store.addAccountModule.accountName