Skip to content

fix: add solana modal title #31660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions app/_locales/en_GB/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ describe('AccountListMenu', () => {
button.click();

fireEvent.click(getByText('Ethereum account'));
const header = document.querySelector('header') as Element;
expect(header.innerHTML).toContain('Add Ethereum account');
const addAccountButton = document.querySelector(
'[data-testid="submit-add-account-with-name"]',
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,26 +202,27 @@ const SNAP_CLIENT_CONFIG_MAP: Record<
* @returns The title for this action mode.
*/
export const getActionTitle = (
t: (text: string) => string,
t: (text: string, args?: string[]) => string,
actionMode: ActionMode,
) => {
switch (actionMode) {
case ACTION_MODES.ADD:
return t('addAccountFromNetwork', ['Ethereum']);
case ACTION_MODES.MENU:
return t('addAccount');
///: BEGIN:ONLY_INCLUDE_IF(build-flask)
case ACTION_MODES.ADD_WATCH_ONLY:
return t('addAccount');
return t('addAccountFromNetwork', ['Ethereum']);
///: END:ONLY_INCLUDE_IF
///: BEGIN:ONLY_INCLUDE_IF(bitcoin)
case ACTION_MODES.ADD_BITCOIN:
return t('addAccount');
return t('addAccountFromNetwork', ['Bitcoin']);
case ACTION_MODES.ADD_BITCOIN_TESTNET:
return t('addAccount');
return t('addAccountFromNetwork', ['Bitcoin Testnet']);
///: END:ONLY_INCLUDE_IF
///: BEGIN:ONLY_INCLUDE_IF(solana)
case ACTION_MODES.ADD_SOLANA:
return t('addAccount');
return t('addAccountFromNetwork', ['Solana']);
///: END:ONLY_INCLUDE_IF
case ACTION_MODES.IMPORT:
return t('importPrivateKey');
Expand All @@ -231,7 +232,7 @@ export const getActionTitle = (
case ACTION_MODES.IMPORT_SRP:
return t('importSecretRecoveryPhrase');
case ACTION_MODES.SELECT_SRP:
return t('addAccount');
return t('selectSecretRecoveryPhrase');
///: END:ONLY_INCLUDE_IF
default:
return t('selectAnAccount');
Expand Down
Loading