diff --git a/components/brave_wallet/browser/brave_wallet_constants.h b/components/brave_wallet/browser/brave_wallet_constants.h index 39f53bb58ede..06033d60c46c 100644 --- a/components/brave_wallet/browser/brave_wallet_constants.h +++ b/components/brave_wallet/browser/brave_wallet_constants.h @@ -1288,19 +1288,6 @@ inline constexpr webui::LocalizedString kLocalizedStrings[] = { {"braveWalletHelpCenterText", IDS_BRAVE_WALLET_HELP_CENTER_TEXT}, {"braveWalletBuyTapBuyNotSupportedMessage", IDS_BRAVE_WALLET_BUY_TAB_BUY_NOT_SUPPORTED_MESSAGE}, - {"braveWalletAuroraModalTitle", IDS_BRAVE_WALLET_AURORA_MODAL_TITLE}, - {"braveWalletAuroraModalDescription", - IDS_BRAVE_WALLET_AURORA_MODAL_DESCRIPTION}, - {"braveWalletAuroraModalLearnMore", - IDS_BRAVE_WALLET_AURORA_MODAL_LEARN_MORE}, - {"braveWalletAuroraModalLearnMoreAboutRisk", - IDS_BRAVE_WALLET_AURORA_MODAL_LEARN_MORE_ABOUT_RISK}, - {"braveWalletAuroraModalDontShowAgain", - IDS_BRAVE_WALLET_AURORA_MODAL_DONT_SHOW_AGAIN}, - {"braveWalletAuroraModalOPenButtonText", - IDS_BRAVE_WALLET_AURORA_MODAL_OPEN_BUTTON_TEXT}, - {"braveWalletBridgeToAuroraButton", - IDS_BRAVE_WALLET_BRIDGE_TO_AURORA_BUTTON}, {"braveWalletPasswordStrengthTooltipHeading", IDS_BRAVE_WALLET_PASSWORD_STRENGTH_TOOLTIP_HEADING}, {"braveWalletPasswordStrengthTooltipIsLongEnough", diff --git a/components/brave_wallet_ui/assets/svg-icons/globe-connect-icon.svg b/components/brave_wallet_ui/assets/svg-icons/globe-connect-icon.svg deleted file mode 100644 index 29ed866ee78f..000000000000 --- a/components/brave_wallet_ui/assets/svg-icons/globe-connect-icon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/components/brave_wallet_ui/components/desktop/popup-modals/bridge-to-aurora-modal/bridge-to-aurora-modal-styles.tsx b/components/brave_wallet_ui/components/desktop/popup-modals/bridge-to-aurora-modal/bridge-to-aurora-modal-styles.tsx deleted file mode 100644 index 98b82feffd28..000000000000 --- a/components/brave_wallet_ui/components/desktop/popup-modals/bridge-to-aurora-modal/bridge-to-aurora-modal-styles.tsx +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2022 The Brave Authors. All rights reserved. -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this file, -// you can obtain one at https://mozilla.org/MPL/2.0/. - -import styled from 'styled-components' -import { WalletButton } from '../../../shared/style' -import GlobeConnectIcon from '../../../../assets/svg-icons/globe-connect-icon.svg' - -export const StyledWrapper = styled.div` - display: flex; - flex-direction: column; - align-items: flex-start; - justify-content: center; - margin: 32px 78px 39px; -` - -export const Title = styled.h4` - font-family: 'Poppins'; - font-style: normal; - font-weight: 600; - font-size: 18px; - line-height: 26px; - color: ${(p) => p.theme.color.text02}; - text-align: center; - margin: 0 0 7px; - align-self: center; -` - -export const Description = styled.p` - font-family: 'Poppins'; - font-style: normal; - font-weight: 400; - font-size: 14px; - line-height: 20px; - color: ${(p) => p.theme.color.text02}; - margin: 0; -` - -export const LearnMoreLink = styled.a` - font-family: 'Poppins'; - font-style: normal; - font-weight: 400; - font-size: 14px; - line-height: 20px; - color: ${(p) => p.theme.color.interactive05}; - text-decoration: none; - display: block; - margin-top: 6px; -` - -export const OpenRainbowAppButton = styled(WalletButton)` - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - padding: 8px 14px; - height: 40px; - cursor: pointer; - outline: none; - border-radius: 40px; - background-color: ${(p) => p.theme.palette.blurple500}; - border: none; - align-self: center; - margin-top: 36px; - margin-bottom: 12px; -` - -export const ButtonText = styled.span` - font-family: 'Poppins'; - font-style: normal; - font-weight: 600; - font-size: 14px; - line-height: 21px; - color: ${(p) => p.theme.palette.white}; -` - -export const GlobeIcon = styled.div` - width: 24px; - height: 24px; - background: url(${GlobeConnectIcon}); - margin-right: 8px; -` - -export const CheckboxWrapper = styled.div` - display: flex; - align-items: center; - justify-content: flex-start; - margin: 12px 0; -` diff --git a/components/brave_wallet_ui/components/desktop/popup-modals/bridge-to-aurora-modal/bridge-to-aurora-modal.tsx b/components/brave_wallet_ui/components/desktop/popup-modals/bridge-to-aurora-modal/bridge-to-aurora-modal.tsx deleted file mode 100644 index a9b1d3a4fc46..000000000000 --- a/components/brave_wallet_ui/components/desktop/popup-modals/bridge-to-aurora-modal/bridge-to-aurora-modal.tsx +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2022 The Brave Authors. All rights reserved. -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this file, -// you can obtain one at https://mozilla.org/MPL/2.0/. - -import * as React from 'react' -import { getLocale } from '../../../../../common/locale' - -import { PopupModal } from '../../popup-modals/index' -import { - ButtonText, - Description, - GlobeIcon, - LearnMoreLink, - OpenRainbowAppButton, - StyledWrapper, - Title, - CheckboxWrapper -} from './bridge-to-aurora-modal-styles' -import { Checkbox } from '../../../shared/checkbox/checkbox' - -interface Props { - dontShowWarningAgain: boolean - onClose: () => void - onOpenRainbowAppClick: () => void - onDontShowAgain: (selected: boolean) => void -} - -const learnMoreLink = 'https://doc.aurora.dev/bridge/bridge-overview/' -const learnMoreRiskMitigation = 'https://rainbowbridge.app/approvals' - -export const BridgeToAuroraModal = ({ - dontShowWarningAgain, - onClose, - onOpenRainbowAppClick, - onDontShowAgain -}: Props) => { - return ( - - - {getLocale('braveWalletAuroraModalTitle')} - - {getLocale('braveWalletAuroraModalDescription')} - - - - {getLocale('braveWalletAuroraModalDontShowAgain')} - - - - - - {getLocale('braveWalletAuroraModalOPenButtonText')} - - - - {getLocale('braveWalletAuroraModalLearnMore')} - - - {getLocale('braveWalletAuroraModalLearnMoreAboutRisk')} - - - - ) -} diff --git a/components/brave_wallet_ui/components/desktop/views/portfolio/portfolio-fungible-asset.tsx b/components/brave_wallet_ui/components/desktop/views/portfolio/portfolio-fungible-asset.tsx index 2114d667c947..f93a88ddadc3 100644 --- a/components/brave_wallet_ui/components/desktop/views/portfolio/portfolio-fungible-asset.tsx +++ b/components/brave_wallet_ui/components/desktop/views/portfolio/portfolio-fungible-asset.tsx @@ -35,10 +35,7 @@ import { getPriceIdForToken } from '../../../../utils/pricing-utils' import { networkSupportsAccount } from '../../../../utils/network-utils' -import { - auroraSupportedContractAddresses, - getAssetIdKey -} from '../../../../utils/asset-utils' +import { getAssetIdKey } from '../../../../utils/asset-utils' import { getLocale } from '../../../../../common/locale' import { makeNetworkAsset } from '../../../../options/asset-options' import { isRewardsAssetId } from '../../../../utils/rewards_utils' @@ -61,9 +58,6 @@ import { import { AccountsAndTransactionsList // } from './components/accounts-and-transctions-list' -import { - BridgeToAuroraModal // -} from '../../popup-modals/bridge-to-aurora-modal/bridge-to-aurora-modal' import { EditTokenModal // } from '../../popup-modals/edit_token_modal/edit_token_modal' @@ -106,17 +100,10 @@ import { } from '../../wallet-page-wrapper/wallet-page-wrapper' import { AssetDetailsHeader } from '../../card-headers/asset-details-header' -const rainbowbridgeLink = 'https://rainbowbridge.app' -const bridgeToAuroraDontShowAgainKey = 'bridgeToAuroraDontShowAgain' - const emptyPriceList: TokenPriceHistory[] = [] export const PortfolioFungibleAsset = () => { // state - const [showBridgeToAuroraModal, setShowBridgeToAuroraModal] = - React.useState(false) - const [dontShowAuroraWarning, setDontShowAuroraWarning] = - React.useState(false) const [showTokenDetailsModal, setShowTokenDetailsModal] = React.useState(false) const [showHideTokenModel, setShowHideTokenModal] = @@ -263,19 +250,6 @@ export const PortfolioFungibleAsset = () => { querySubscriptionOptions60s ) - const isSelectedAssetBridgeSupported = React.useMemo(() => { - if (!selectedAssetFromParams) return false - const isBridgeAddress = auroraSupportedContractAddresses.includes( - selectedAssetFromParams.contractAddress.toLowerCase() - ) - const isNativeAsset = selectedAssetFromParams.contractAddress === '' - - return ( - (isBridgeAddress || isNativeAsset) && - selectedAssetFromParams.chainId === BraveWallet.MAINNET_CHAIN_ID - ) - }, [selectedAssetFromParams]) - const selectedAssetTransactions = React.useMemo(() => { const nativeAsset = makeNetworkAsset(selectedAssetsNetwork) @@ -351,35 +325,6 @@ export const PortfolioFungibleAsset = () => { history.push(WalletRoutes.PortfolioAssets) }, [dispatch, history]) - const onOpenRainbowAppClick = React.useCallback(() => { - chrome.tabs.create({ url: rainbowbridgeLink }, () => { - if (chrome.runtime.lastError) { - console.error('tabs.create failed: ' + chrome.runtime.lastError.message) - } - }) - setShowBridgeToAuroraModal(false) - }, []) - - const onBridgeToAuroraButton = React.useCallback(() => { - if (dontShowAuroraWarning) { - onOpenRainbowAppClick() - } else { - setShowBridgeToAuroraModal(true) - } - }, [dontShowAuroraWarning, onOpenRainbowAppClick]) - - const onDontShowAgain = React.useCallback((selected: boolean) => { - setDontShowAuroraWarning(selected) - localStorage.setItem( - bridgeToAuroraDontShowAgainKey, - JSON.stringify(selected) - ) - }, []) - - const onCloseAuroraModal = React.useCallback(() => { - setShowBridgeToAuroraModal(false) - }, []) - const onCloseTokenDetailsModal = React.useCallback( () => setShowTokenDetailsModal(false), [] @@ -434,14 +379,6 @@ export const PortfolioFungibleAsset = () => { } }, [history, selectedAssetFromParams]) - React.useEffect(() => { - setDontShowAuroraWarning( - JSON.parse( - localStorage.getItem(bridgeToAuroraDontShowAgainKey) || 'false' - ) - ) - }, []) - // asset not found if (!selectedAssetFromParams && !isLoadingRewards && !isLoadingTokens) { return @@ -515,25 +452,9 @@ export const PortfolioFungibleAsset = () => { )} - {isSelectedAssetBridgeSupported && ( -
- - {getLocale('braveWalletBridgeToAuroraButton')} - -
- )} - {showBridgeToAuroraModal && ( - - )} - {showTokenDetailsModal && selectedAssetFromParams && selectedAssetsNetwork && ( diff --git a/components/brave_wallet_ui/stories/locale.ts b/components/brave_wallet_ui/stories/locale.ts index dca74c7ec96a..0011b43bb32d 100644 --- a/components/brave_wallet_ui/stories/locale.ts +++ b/components/brave_wallet_ui/stories/locale.ts @@ -1322,19 +1322,6 @@ provideStrings({ // Remove Account Modal braveWalletRemoveAccountModalTitle: 'Are you sure you want to remove "$1"?', - // Bridge to Aurora - braveWalletAuroraModalTitle: 'Open the Rainbow Bridge app?', - braveWalletAuroraModalDescription: - 'Rainbow Bridge is an independent service that helps you bridge ' + - 'assets across networks, and use your crypto on other networks ' + - 'and DApp ecosystems. Bridging assets to other networks has some risks.', - braveWalletAuroraModalLearnMore: 'Learn more about using Rainbow Bridge', - braveWalletAuroraModalLearnMoreAboutRisk: - 'Learn more about mitigating risk on Rainbow Bridge', - braveWalletAuroraModalDontShowAgain: "Don't show again", - braveWalletAuroraModalOPenButtonText: 'Open the Rainbow Bridge app', - braveWalletBridgeToAuroraButton: 'Bridge to Aurora', - // Input field labels braveWalletInputLabelPassword: 'Password', diff --git a/components/brave_wallet_ui/utils/asset-utils.ts b/components/brave_wallet_ui/utils/asset-utils.ts index f7adada4792e..d41c120f816a 100644 --- a/components/brave_wallet_ui/utils/asset-utils.ts +++ b/components/brave_wallet_ui/utils/asset-utils.ts @@ -75,37 +75,6 @@ export const getRampAssetSymbol = ( : asset.symbol } -export const auroraSupportedContractAddresses = [ - '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9', // AAVE - '0xaaaaaa20d9e0e2461697782ef11675f668207961', // AURORA - '0xba100000625a3754423978a60c9317c58a424e3d', // BAL - '0x0d8775f648430679a709e98d2b0cb6250d2887ef', // BAT - '0xc00e94cb662c3520282e6f5717214004a7f26888', // COMP - '0x2ba592f78db6436527729929aaf6c908497cb200', // CREAM - '0x6b175474e89094c44da98b954eedeac495271d0f', // DAI - '0x43dfc4159d86f3a37a5a4b3d4580b888ad7d4ddd', // DODO - '0x3ea8ea4237344c9931214796d9417af1a1180770', // FLX - '0x853d955acef822db058eb8505911ed77f175b99e', // FRAX - '0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0', // FXS - '0xd9c2d319cd7e6177336b0a9c93c21cb48d84fb54', // HAPI - '0x514910771af9ca656af840dff83e8264ecf986ca', // LINK - '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2', // MKR - '0x1117ac6ad6cdf1a3bc543bad3b133724620522d5', // MODA - '0xf5cfbc74057c610c8ef151a439252680ac68c6dc', // OCT - '0x9aeb50f542050172359a0e1a25a9933bc8c01259', // OIN - '0xea7cc765ebc94c4805e3bff28d7e4ae48d06468a', // PAD - '0x429881672b9ae42b8eba0e26cd9c73711b891ca5', // PICKLE - '0x408e41876cccdc0f92210600ef50372656052a38', // REN - '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', // SNX - '0x6b3595068778dd592e39a122f4f5a5cf09c90fe2', // SUSHI - '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984', // UNI - '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC - '0xdac17f958d2ee523a2206206994597c13d831ec7', // USDT - '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599', // WBTC - '0x4691937a7508860f876c9c0a2a617e7d9e945d4b', // WOO - '0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e' // YFI -].map((contractAddress) => contractAddress.toLowerCase()) - export const addChainIdToToken = ( token: BraveWallet.BlockchainToken, chainId: string diff --git a/components/resources/wallet_strings.grdp b/components/resources/wallet_strings.grdp index fd03c2579a20..7e47af10ecde 100644 --- a/components/resources/wallet_strings.grdp +++ b/components/resources/wallet_strings.grdp @@ -845,13 +845,6 @@ This hardware wallet does not support this operation. Enter your Brave Wallet password Enter your password - Open the Rainbow Bridge app? - Rainbow Bridge is an independent service that helps you bridge assets across networks, and use your crypto on other networks and DApp ecosystems. Bridging assets to other networks has some risks. - Learn more about using Rainbow Bridge - Learn more about mitigating risk on Rainbow Bridge - Don't show again - Open Rainbow Bridge app - Bridge to Aurora Learn more about Brave Wallet Password should have: At least 8 characters