diff --git a/test/e2e/tests/settings/account-token-list.spec.js b/test/e2e/tests/settings/account-token-list.spec.js index ddd905501f50..ec24119dd44b 100644 --- a/test/e2e/tests/settings/account-token-list.spec.js +++ b/test/e2e/tests/settings/account-token-list.spec.js @@ -116,4 +116,41 @@ describe('Settings', function () { }, ); }); + + it('Should show crypto value when price checker setting is off', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder() + .withConversionRateEnabled() + .withShowFiatTestnetEnabled() + .withPreferencesControllerShowNativeTokenAsMainBalanceDisabled() + .withConversionRateDisabled() + .build(), + ganacheOptions: defaultGanacheOptions, + title: this.test.fullTitle(), + testSpecificMock: mockInfuraResponses, + }, + async ({ driver }) => { + await unlockWallet(driver); + + await driver.clickElement('[data-testid="popover-close"]'); + await driver.clickElement( + '[data-testid="account-overview__asset-tab"]', + ); + + const tokenListAmount = await driver.findElement( + '.eth-overview__primary-container', + ); + await driver.delay(1000); + assert.equal(await tokenListAmount.getText(), '25\nETH'); + + await driver.clickElement('[data-testid="account-menu-icon"]'); + const accountTokenValue = await driver.waitForSelector( + '.multichain-account-list-item .multichain-account-list-item__asset', + ); + + assert.equal(await accountTokenValue.getText(), '25ETH'); + }, + ); + }); }); diff --git a/ui/components/multichain/account-list-item/account-list-item.js b/ui/components/multichain/account-list-item/account-list-item.js index 6be8e3f67f0b..207b8fa0fe58 100644 --- a/ui/components/multichain/account-list-item/account-list-item.js +++ b/ui/components/multichain/account-list-item/account-list-item.js @@ -143,7 +143,7 @@ const AccountListItem = ({ let balanceToTranslate; if (isEvmNetwork) { balanceToTranslate = - shouldShowFiat || isTestnet || !process.env.PORTFOLIO_VIEW + !shouldShowFiat || isTestnet || !process.env.PORTFOLIO_VIEW ? account.balance : totalFiatBalance; } else { @@ -345,7 +345,7 @@ const AccountListItem = ({ type={PRIMARY} showFiat={showFiat} isAggregatedFiatOverviewBalance={ - !isTestnet && process.env.PORTFOLIO_VIEW + !isTestnet && process.env.PORTFOLIO_VIEW && shouldShowFiat } data-testid="first-currency-display" privacyMode={privacyMode}