Skip to content
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

fix: currency preferences toggle not displayed #21985

Merged
merged 1 commit into from
Nov 23, 2023
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
2 changes: 1 addition & 1 deletion ui/pages/settings/settings-tab/settings-tab.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const mapStateToProps = (state, ownProps) => {
} = state;
const {
currentCurrency,
nativeCurrency,
providerConfig: { ticker: nativeCurrency },
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after changes on the controller , nativeCurrency is removed from state.metamask.
it was replaced everywhere with the ticker value got from providerConfig ( e.g: getNativeCurrency function ) but it seems to have been forgotten to replace it at this level too.
and this is why we have this bug

useBlockie,
currentLocale,
selectedAddress,
Expand Down
8 changes: 8 additions & 0 deletions ui/pages/settings/settings-tab/settings-tab.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ describe('Settings Tab', () => {
).toHaveBeenCalled();
});

it('should display currency symbol for native token', async () => {
const { getByText } = renderWithProvider(<SettingsTab />, mockStore);

const textElement = getByText('ETH');

expect(textElement).toBeInTheDocument();
});

it('clicks jazzicon', () => {
const { queryByTestId } = renderWithProvider(<SettingsTab />, mockStore);

Expand Down
Loading