From 2542ee80fe8b5eaa029bb6ec76dcd257ca93a161 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 1 Apr 2023 16:12:51 +0100 Subject: [PATCH] eth-overview merge fix --- .../app/wallet-overview/eth-overview.js | 122 +++--------------- 1 file changed, 20 insertions(+), 102 deletions(-) diff --git a/ui/components/app/wallet-overview/eth-overview.js b/ui/components/app/wallet-overview/eth-overview.js index 3b082800b..1085074bf 100644 --- a/ui/components/app/wallet-overview/eth-overview.js +++ b/ui/components/app/wallet-overview/eth-overview.js @@ -88,109 +88,27 @@ const EthOverview = ({ className }) => { } buttons={ - <> - { - trackEvent({ - event: EVENT_NAMES.NAV_SEND_BUTTON_CLICKED, - category: EVENT.CATEGORIES.NAVIGATION, - properties: { - token_symbol: 'ETH', - location: 'Home', - text: 'Send', - }, - }); - dispatch( - startNewDraftTransaction({ type: AssetType.native }), - ).then(() => { + { + trackEvent({ + event: EVENT_NAMES.NAV_SEND_BUTTON_CLICKED, + category: EVENT.CATEGORIES.NAVIGATION, + properties: { + token_symbol: 'ETH', + location: 'Home', + text: 'Send', + }, + }); + dispatch(startNewDraftTransaction({ type: AssetType.native })).then( + () => { history.push(SEND_ROUTE); - }); - }} - /> - - } - onClick={() => { - if (isSwapsChain) { - trackEvent({ - event: EVENT_NAMES.NAV_SWAP_BUTTON_CLICKED, - category: EVENT.CATEGORIES.SWAPS, - properties: { - token_symbol: 'ETH', - location: EVENT.SOURCE.SWAPS.MAIN_VIEW, - text: 'Swap', - }, - }); - dispatch(setSwapsFromToken(defaultSwapsToken)); - if (usingHardwareWallet) { - global.platform.openExtensionInBrowser(BUILD_QUOTE_ROUTE); - } else { - history.push(BUILD_QUOTE_ROUTE); - } - } - }} - label={t('swap')} - tooltipRender={ - isSwapsChain - ? null - : (contents) => ( - - {contents} - - ) - } - /> - - } - label={t('bridge')} - onClick={() => { - if (isBridgeChain) { - const portfolioUrl = process.env.PORTFOLIO_URL; - const bridgeUrl = `${portfolioUrl}/bridge`; - global.platform.openTab({ - url: `${bridgeUrl}?metamaskEntry=ext`, - }); - trackEvent({ - category: EVENT.CATEGORIES.NAVIGATION, - event: EVENT_NAMES.BRIDGE_LINK_CLICKED, - properties: { - location: 'Home', - text: 'Bridge', - }, - }); - } - }} - tooltipRender={ - isBridgeChain - ? null - : (contents) => ( - - {contents} - - ) - } - /> - + }, + ); + }} + /> } className={className} icon={}