mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
removed portfolio link from wallet view (#19716)
* removed portfolio link from wallet view * removed unused code * updated test * updated spec file * updated test
This commit is contained in:
parent
80bfb5b501
commit
dfb830e862
@ -26,7 +26,7 @@ describe('Portfolio site', function () {
|
||||
await driver.press('#password', driver.Key.ENTER);
|
||||
|
||||
// Click Portfolio site
|
||||
await driver.clickElement('[data-testid="home__portfolio-site"]');
|
||||
await driver.clickElement('[data-testid="eth-overview-portfolio"]');
|
||||
await driver.waitUntilXWindowHandles(2);
|
||||
const windowHandles = await driver.getAllWindowHandles();
|
||||
await driver.switchToWindowWithTitle('E2E Test Dapp', windowHandles);
|
||||
@ -34,7 +34,7 @@ describe('Portfolio site', function () {
|
||||
// Verify site
|
||||
assert.equal(
|
||||
await driver.getCurrentUrl(),
|
||||
'http://127.0.0.1:8080/?metamaskEntry=ext&metametricsId=null',
|
||||
'http://127.0.0.1:8080/?metamaskEntry=ext_portfolio_button&metametricsId=null',
|
||||
);
|
||||
},
|
||||
);
|
||||
|
@ -36,7 +36,6 @@ import IconButton from '../../ui/icon-button';
|
||||
import { isHardwareKeyring } from '../../../helpers/utils/hardware';
|
||||
import { MetaMetricsContext } from '../../../contexts/metametrics';
|
||||
import {
|
||||
MetaMetricsContextProp,
|
||||
MetaMetricsEventCategory,
|
||||
MetaMetricsEventName,
|
||||
MetaMetricsSwapsEventSource,
|
||||
@ -44,12 +43,7 @@ import {
|
||||
import Spinner from '../../ui/spinner';
|
||||
import { startNewDraftTransaction } from '../../../ducks/send';
|
||||
import { AssetType } from '../../../../shared/constants/transaction';
|
||||
import {
|
||||
ButtonIcon,
|
||||
ButtonIconSize,
|
||||
Icon,
|
||||
IconName,
|
||||
} from '../../component-library';
|
||||
import { Icon, IconName } from '../../component-library';
|
||||
import { IconColor } from '../../../helpers/constants/design-system';
|
||||
import useRamps from '../../../hooks/experiences/useRamps';
|
||||
import { getPortfolioUrl } from '../../../helpers/utils/portfolio';
|
||||
@ -156,42 +150,6 @@ const EthOverview = ({ className }) => {
|
||||
{balanceIsCached ? (
|
||||
<span className="eth-overview__cached-star">*</span>
|
||||
) : null}
|
||||
{
|
||||
///: BEGIN:ONLY_INCLUDE_IN(build-main,build-beta,build-flask)
|
||||
<ButtonIcon
|
||||
className="eth-overview__portfolio-button"
|
||||
data-testid="home__portfolio-site"
|
||||
color={IconColor.primaryDefault}
|
||||
iconName={IconName.Diagram}
|
||||
ariaLabel={t('portfolio')}
|
||||
size={ButtonIconSize.Lg}
|
||||
onClick={() => {
|
||||
const portfolioUrl = getPortfolioUrl(
|
||||
'',
|
||||
'ext',
|
||||
metaMetricsId,
|
||||
);
|
||||
global.platform.openTab({
|
||||
url: portfolioUrl,
|
||||
});
|
||||
trackEvent(
|
||||
{
|
||||
category: MetaMetricsEventCategory.Home,
|
||||
event: MetaMetricsEventName.PortfolioLinkClicked,
|
||||
properties: {
|
||||
url: portfolioUrl,
|
||||
},
|
||||
},
|
||||
{
|
||||
contextPropsIntoEventProperties: [
|
||||
MetaMetricsContextProp.PageTitle,
|
||||
],
|
||||
},
|
||||
);
|
||||
}}
|
||||
/>
|
||||
///: END:ONLY_INCLUDE_IN
|
||||
}
|
||||
</div>
|
||||
{showFiat && balance && (
|
||||
<UserPreferencedCurrencyDisplay
|
||||
|
@ -71,7 +71,7 @@ describe('EthOverview', () => {
|
||||
const store = configureMockStore([thunk])(mockStore);
|
||||
const ETH_OVERVIEW_BUY = 'eth-overview-buy';
|
||||
const ETH_OVERVIEW_BRIDGE = 'eth-overview-bridge';
|
||||
const ETH_OVERVIEW_PORTFOLIO = 'home__portfolio-site';
|
||||
const ETH_OVERVIEW_PORTFOLIO = 'eth-overview-portfolio';
|
||||
const ETH_OVERVIEW_PRIMARY_CURRENCY = 'eth-overview__primary-currency';
|
||||
const ETH_OVERVIEW_SECONDARY_CURRENCY = 'eth-overview__secondary-currency';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user