From cbfbce3f627711122d82c297d389c555a8dac583 Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Mon, 4 Mar 2024 09:57:40 +0100 Subject: [PATCH] fix(wallet): naming of first and subsequent wallet accounts Closes #12693 --- libs/Onboarding/src/Onboarding/Accounts/AccountsService.cpp | 2 +- src/app_service/service/accounts/service.nim | 5 +++-- test/ui-test/src/constants/wallet.py | 2 +- .../suite_wallet/tst_wallet_accountsManagement/test.feature | 4 ++-- .../suite_wallet/tst_wallet_transactions/test.feature | 2 +- ui/imports/shared/popups/addaccount/states/Main.qml | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libs/Onboarding/src/Onboarding/Accounts/AccountsService.cpp b/libs/Onboarding/src/Onboarding/Accounts/AccountsService.cpp index 4ba83d8130..2bb8d98f0a 100644 --- a/libs/Onboarding/src/Onboarding/Accounts/AccountsService.cpp +++ b/libs/Onboarding/src/Onboarding/Accounts/AccountsService.cpp @@ -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}, diff --git a/src/app_service/service/accounts/service.nim b/src/app_service/service/accounts/service.nim index 812cbb85d2..764654804c 100644 --- a/src/app_service/service/accounts/service.nim +++ b/src/app_service/service/accounts/service.nim @@ -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, }, diff --git a/test/ui-test/src/constants/wallet.py b/test/ui-test/src/constants/wallet.py index 6e87919cf6..6d492163e2 100644 --- a/test/ui-test/src/constants/wallet.py +++ b/test/ui-test/src/constants/wallet.py @@ -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']) diff --git a/test/ui-test/testSuites/suite_wallet/tst_wallet_accountsManagement/test.feature b/test/ui-test/testSuites/suite_wallet/tst_wallet_accountsManagement/test.feature index bb69037ebb..1c4c49c020 100644 --- a/test/ui-test/testSuites/suite_wallet/tst_wallet_accountsManagement/test.feature +++ b/test/ui-test/testSuites/suite_wallet/tst_wallet_accountsManagement/test.feature @@ -14,8 +14,8 @@ Feature: Status Desktop Wallet Section Wallet Account Management And the user edits an account with "" to "" with color "#" and emoji "" Then the account is correctly displayed with "" and "#" and 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 "
" with "" color "#" and emoji "" diff --git a/test/ui-test/testSuites/suite_wallet/tst_wallet_transactions/test.feature b/test/ui-test/testSuites/suite_wallet/tst_wallet_transactions/test.feature index 717a90b308..0b61b047fc 100644 --- a/test/ui-test/testSuites/suite_wallet/tst_wallet_transactions/test.feature +++ b/test/ui-test/testSuites/suite_wallet/tst_wallet_transactions/test.feature @@ -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 "" "" on "" with password "qqqqqqqqqq" + When the user sends a transaction to himself from account "Account 1" of "" "" on "" with password "qqqqqqqqqq" Then the transaction is in progress Examples: diff --git a/ui/imports/shared/popups/addaccount/states/Main.qml b/ui/imports/shared/popups/addaccount/states/Main.qml index 1b86182c58..f0359428e1 100644 --- a/ui/imports/shared/popups/addaccount/states/Main.qml +++ b/ui/imports/shared/popups/addaccount/states/Main.qml @@ -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