diff --git a/.eslintrc.js b/.eslintrc.js index 5d143abed95..2a8eb074584 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -97,7 +97,7 @@ module.exports = { 'selectProviderType', 'selectRpcUrl', 'selectSelectedNetworkClientId', - 'selectTicker' + 'selectTicker', ] .map((method) => `(${method})`) .join('|')}/]`, diff --git a/app/components/UI/NetworkVerificationInfo/NetworkVerificationInfo.test.tsx b/app/components/UI/NetworkVerificationInfo/NetworkVerificationInfo.test.tsx index 7f5a3721f5f..5ec13d28410 100644 --- a/app/components/UI/NetworkVerificationInfo/NetworkVerificationInfo.test.tsx +++ b/app/components/UI/NetworkVerificationInfo/NetworkVerificationInfo.test.tsx @@ -109,7 +109,9 @@ describe('NetworkVerificationInfo', () => { ); expect(() => - getByText('Attackers sometimes mimic sites by making small changes to the site address. Make sure you\'re interacting with the intended Network URL before you continue. Punycode version: https://xn--ifura-dig.io/gnosis') + getByText( + "Attackers sometimes mimic sites by making small changes to the site address. Make sure you're interacting with the intended Network URL before you continue. Punycode version: https://xn--ifura-dig.io/gnosis", + ), ).toThrow('Unable to find an element with text'); }); @@ -127,7 +129,11 @@ describe('NetworkVerificationInfo', () => { />, ); - expect(getByText('Attackers sometimes mimic sites by making small changes to the site address. Make sure you\'re interacting with the intended Network URL before you continue. Punycode version: https://xn--ifura-dig.io/gnosis')).toBeTruthy(); + expect( + getByText( + "Attackers sometimes mimic sites by making small changes to the site address. Make sure you're interacting with the intended Network URL before you continue. Punycode version: https://xn--ifura-dig.io/gnosis", + ), + ).toBeTruthy(); }); }); }); diff --git a/app/components/UI/NetworkVerificationInfo/NetworkVerificationInfo.tsx b/app/components/UI/NetworkVerificationInfo/NetworkVerificationInfo.tsx index 88e1cb436b7..128a9df0c94 100644 --- a/app/components/UI/NetworkVerificationInfo/NetworkVerificationInfo.tsx +++ b/app/components/UI/NetworkVerificationInfo/NetworkVerificationInfo.tsx @@ -239,9 +239,7 @@ const NetworkVerificationInfo = ({ : strings('add_custom_network.network_url')} )} - - {hideKeyFromUrl(customRpcUrl)} - + {hideKeyFromUrl(customRpcUrl)} { - if (!customRpcUrl || isValidASCIIURL(customRpcUrl)) { return null; } + if (!customRpcUrl || isValidASCIIURL(customRpcUrl)) { + return null; + } const punycodeUrl = toPunycodeURL(customRpcUrl); return ( @@ -353,9 +353,7 @@ const NetworkVerificationInfo = ({ {strings('networks.current_label')} - - {customRpcUrl} - + {customRpcUrl} {strings('networks.new_label')} diff --git a/app/components/UI/PermissionsSummary/PermissionsSummary.tsx b/app/components/UI/PermissionsSummary/PermissionsSummary.tsx index cf998ed53a2..aa177bf84e7 100644 --- a/app/components/UI/PermissionsSummary/PermissionsSummary.tsx +++ b/app/components/UI/PermissionsSummary/PermissionsSummary.tsx @@ -291,7 +291,13 @@ const PermissionsSummary = ({ - + {getAccountLabel()} diff --git a/app/components/UI/PermissionsSummary/__snapshots__/PermissionsSummary.test.tsx.snap b/app/components/UI/PermissionsSummary/__snapshots__/PermissionsSummary.test.tsx.snap index 5a7dd44c123..58a4fd16bfb 100644 --- a/app/components/UI/PermissionsSummary/__snapshots__/PermissionsSummary.test.tsx.snap +++ b/app/components/UI/PermissionsSummary/__snapshots__/PermissionsSummary.test.tsx.snap @@ -232,6 +232,7 @@ exports[`PermissionsSummary should render correctly 1`] = ` "lineHeight": 22, } } + testID="permission-summary-account-text" > ({ + getTotalFiatAccountBalance: () => ({ tokenFiat: 10 }), +})); + jest.mock('../../../../util/address', () => ({ ...jest.requireActual('../../../../util/address'), getAddressAccountType: (str: string) => str, @@ -23,11 +27,8 @@ describe('Confirm', () => { state: personalSignatureConfirmationState, }); expect(getByText('Signature request')).toBeDefined(); - expect(getByText('Estimated changes')).toBeDefined(); expect( - getByText( - 'You’re signing into a site and there are no predicted changes to your account.', - ), + getByText('Review request details before you confirm.'), ).toBeDefined(); expect(getByText('Request from')).toBeDefined(); expect(getByText('metamask.github.io')).toBeDefined(); diff --git a/app/components/Views/confirmations/components/BlockaidBanner/BlockaidBanner.styles.ts b/app/components/Views/confirmations/components/BlockaidBanner/BlockaidBanner.styles.ts index e62e15af4d2..4ab64b9daa0 100644 --- a/app/components/Views/confirmations/components/BlockaidBanner/BlockaidBanner.styles.ts +++ b/app/components/Views/confirmations/components/BlockaidBanner/BlockaidBanner.styles.ts @@ -16,10 +16,7 @@ const styleSheet = (_params: { }) => StyleSheet.create({ attributionBase: Object.assign({ - height: 24, - flexDirection: 'row', - justifyContent: 'flex-start', - alignItems: 'flex-start', + height: 40, marginTop: 8, } as ViewStyle), attributionItem: { diff --git a/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfo.test.tsx b/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfo.test.tsx index 6c222750652..16ed6ceba59 100644 --- a/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfo.test.tsx +++ b/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfo.test.tsx @@ -4,6 +4,10 @@ import renderWithProvider from '../../../../../../util/test/renderWithProvider'; import { personalSignatureConfirmationState } from '../../../../../../util/test/confirm-data-helpers'; import AccountNetworkInfo from './AccountNetworkInfo'; +jest.mock('../../../../../../core/Engine', () => ({ + getTotalFiatAccountBalance: () => ({ tokenFiat: 10 }), +})); + describe('AccountNetworkInfo', () => { it('should render correctly', async () => { const { getByText } = renderWithProvider(, { diff --git a/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoCollapsed/AccountNetworkInfoCollapsed.test.tsx b/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoCollapsed/AccountNetworkInfoCollapsed.test.tsx index 2044735bf33..201720096fa 100644 --- a/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoCollapsed/AccountNetworkInfoCollapsed.test.tsx +++ b/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoCollapsed/AccountNetworkInfoCollapsed.test.tsx @@ -4,6 +4,10 @@ import renderWithProvider from '../../../../../../../util/test/renderWithProvide import { personalSignatureConfirmationState } from '../../../../../../../util/test/confirm-data-helpers'; import AccountNetworkInfoCollapsed from './AccountNetworkInfoCollapsed'; +jest.mock('../../../../../../../core/Engine', () => ({ + getTotalFiatAccountBalance: () => ({ tokenFiat: 10 }), +})); + describe('AccountNetworkInfoCollapsed', () => { it('should render correctly', async () => { const { getByText } = renderWithProvider(, { diff --git a/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoExpanded/AccountNetworkInfoExpanded.test.tsx b/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoExpanded/AccountNetworkInfoExpanded.test.tsx index 31cf6c367f2..c11146d2318 100644 --- a/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoExpanded/AccountNetworkInfoExpanded.test.tsx +++ b/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoExpanded/AccountNetworkInfoExpanded.test.tsx @@ -4,6 +4,10 @@ import renderWithProvider from '../../../../../../../util/test/renderWithProvide import { personalSignatureConfirmationState } from '../../../../../../../util/test/confirm-data-helpers'; import AccountNetworkInfoExpanded from './AccountNetworkInfoExpanded'; +jest.mock('../../../../../../../core/Engine', () => ({ + getTotalFiatAccountBalance: () => ({ tokenFiat: 10 }), +})); + describe('AccountNetworkInfoExpanded', () => { it('should render correctly', async () => { const { getByText } = renderWithProvider(, { @@ -11,10 +15,8 @@ describe('AccountNetworkInfoExpanded', () => { }); expect(getByText('Account')).toBeDefined(); expect(getByText('Balance')).toBeDefined(); - expect(getByText('0 ETH')).toBeDefined(); + expect(getByText('$10')).toBeDefined(); expect(getByText('Network')).toBeDefined(); expect(getByText('Ethereum Mainnet')).toBeDefined(); - expect(getByText('RPC URL')).toBeDefined(); - expect(getByText('mainnet.infura.io/v3/')).toBeDefined(); }); }); diff --git a/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoExpanded/AccountNetworkInfoExpanded.tsx b/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoExpanded/AccountNetworkInfoExpanded.tsx index 097fc2a9177..91bcb86a567 100644 --- a/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoExpanded/AccountNetworkInfoExpanded.tsx +++ b/app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoExpanded/AccountNetworkInfoExpanded.tsx @@ -1,57 +1,36 @@ import React from 'react'; -import { StyleSheet, View } from 'react-native'; +import { View } from 'react-native'; import { useSelector } from 'react-redux'; import { strings } from '../../../../../../../../locales/i18n'; -import { - selectChainId, - selectProviderConfig, -} from '../../../../../../../selectors/networkController'; +import { selectChainId } from '../../../../../../../selectors/networkController'; +import { renderShortAddress } from '../../../../../../../util/address'; import useAccountInfo from '../../../../hooks/useAccountInfo'; import useApprovalRequest from '../../../../hooks/useApprovalRequest'; import InfoSection from '../../../UI/InfoRow/InfoSection'; import InfoRow from '../../../UI/InfoRow'; -import Address from '../../../UI/InfoRow/InfoValue/Address'; -import DisplayURL from '../../../UI/InfoRow/InfoValue/DisplayURL'; import Network from '../../../UI/InfoRow/InfoValue/Network'; -const styles = StyleSheet.create({ - addressRowValue: { - paddingTop: 8, - }, -}); - const AccountNetworkInfoExpanded = () => { const { approvalRequest } = useApprovalRequest(); const chainId = useSelector(selectChainId); - const { rpcUrl: networkRpcUrl, type: networkType } = - useSelector(selectProviderConfig); const fromAddress = approvalRequest?.requestData?.from; - const { accountAddress, accountBalance } = useAccountInfo(fromAddress); + const { accountAddress, accountFiatBalance } = useAccountInfo(fromAddress); return ( - -
- + {renderShortAddress(accountAddress, 5)} + + + {accountFiatBalance} - {accountBalance} - + - - - ); diff --git a/app/components/Views/confirmations/components/Confirm/DataTree/DataField.tsx b/app/components/Views/confirmations/components/Confirm/DataTree/DataField.tsx index ffb6b435b53..12dd58e3713 100644 --- a/app/components/Views/confirmations/components/Confirm/DataTree/DataField.tsx +++ b/app/components/Views/confirmations/components/Confirm/DataTree/DataField.tsx @@ -17,7 +17,7 @@ const createStyles = (depth: number) => }, dataRow: { paddingHorizontal: 0, - paddingBottom: 0, + paddingBottom: 16, }, }); diff --git a/app/components/Views/confirmations/components/Confirm/Footer/Footer.styles.ts b/app/components/Views/confirmations/components/Confirm/Footer/Footer.styles.ts index 302812a5805..8828b7a8942 100644 --- a/app/components/Views/confirmations/components/Confirm/Footer/Footer.styles.ts +++ b/app/components/Views/confirmations/components/Confirm/Footer/Footer.styles.ts @@ -2,12 +2,15 @@ import { StyleSheet } from 'react-native'; import { Theme } from '../../../../../../util/theme/models'; -const styleSheet = (params: { theme: Theme }) => { - const { theme } = params; +const styleSheet = (params: { theme: Theme; vars: { hasError: boolean } }) => { + const { theme, vars } = params; return StyleSheet.create({ confirmButton: { flex: 1, + backgroundColor: vars.hasError + ? theme.colors.error.default + : theme.colors.primary.default, }, rejectButton: { flex: 1, @@ -19,7 +22,7 @@ const styleSheet = (params: { theme: Theme }) => { }, buttonsContainer: { flexDirection: 'row', - padding: 16, + paddingVertical: 16, }, buttonDivider: { width: 8, diff --git a/app/components/Views/confirmations/components/Confirm/Footer/Footer.tsx b/app/components/Views/confirmations/components/Confirm/Footer/Footer.tsx index 02aac3ff9ae..7394b9a74e1 100644 --- a/app/components/Views/confirmations/components/Confirm/Footer/Footer.tsx +++ b/app/components/Views/confirmations/components/Confirm/Footer/Footer.tsx @@ -4,12 +4,18 @@ import { View } from 'react-native'; import { strings } from '../../../../../../../locales/i18n'; import StyledButton from '../../../../../../components/UI/StyledButton'; import { useStyles } from '../../../../../../component-library/hooks'; +import useApprovalRequest from '../../../hooks/useApprovalRequest'; import { useConfirmActions } from '../../../hooks/useConfirmActions'; import styleSheet from './Footer.styles'; const Footer = () => { const { onConfirm, onReject } = useConfirmActions(); - const { styles } = useStyles(styleSheet, {}); + const { approvalRequest } = useApprovalRequest(); + const securityAlertResponse = + approvalRequest?.requestData?.securityAlertResponse; + const { styles } = useStyles(styleSheet, { + hasError: securityAlertResponse !== undefined, + }); return ( diff --git a/app/components/Views/confirmations/components/Confirm/Info/PersonalSign/PersonalSign.test.tsx b/app/components/Views/confirmations/components/Confirm/Info/PersonalSign/PersonalSign.test.tsx index 46504466408..2da464455bc 100644 --- a/app/components/Views/confirmations/components/Confirm/Info/PersonalSign/PersonalSign.test.tsx +++ b/app/components/Views/confirmations/components/Confirm/Info/PersonalSign/PersonalSign.test.tsx @@ -9,12 +9,6 @@ describe('PersonalSign', () => { const { getByText } = renderWithProvider(, { state: personalSignatureConfirmationState, }); - expect(getByText('Estimated changes')).toBeDefined(); - expect( - getByText( - 'You’re signing into a site and there are no predicted changes to your account.', - ), - ).toBeDefined(); expect(getByText('Request from')).toBeDefined(); expect(getByText('metamask.github.io')).toBeDefined(); expect(getByText('Message')).toBeDefined(); diff --git a/app/components/Views/confirmations/components/Confirm/Info/PersonalSign/PersonalSign.tsx b/app/components/Views/confirmations/components/Confirm/Info/PersonalSign/PersonalSign.tsx index 524de85cf45..59e8862475f 100644 --- a/app/components/Views/confirmations/components/Confirm/Info/PersonalSign/PersonalSign.tsx +++ b/app/components/Views/confirmations/components/Confirm/Info/PersonalSign/PersonalSign.tsx @@ -1,7 +1,6 @@ import React from 'react'; import useApprovalRequest from '../../../../hooks/useApprovalRequest'; -import NoChangeSimulation from '../../NoChangeSimulation'; import InfoRowOrigin from '../Shared/InfoRowOrigin'; import Message from './Message'; @@ -14,7 +13,6 @@ const PersonalSign = () => { return ( <> - diff --git a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Message.styles.ts b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Message.styles.ts new file mode 100644 index 00000000000..068339af44e --- /dev/null +++ b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Message.styles.ts @@ -0,0 +1,28 @@ +import { StyleSheet } from 'react-native'; + +import { Theme } from '../../../../../../../util/theme/models'; +import { fontStyles } from '../../../../../../../styles/common'; + +const styleSheet = (params: { theme: Theme }) => { + const { theme } = params; + + return StyleSheet.create({ + collpasedInfoRow: { + marginStart: -8, + paddingBottom: 4, + }, + dataRow: { + paddingHorizontal: 0, + paddingBottom: 16, + }, + title: { + color: theme.colors.text.default, + ...fontStyles.normal, + fontSize: 14, + fontWeight: '500', + marginBottom: 16, + }, + }); +}; + +export default styleSheet; diff --git a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Message.tsx b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Message.tsx index 04a1d7122c7..3b70d40286b 100644 --- a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Message.tsx +++ b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Message.tsx @@ -1,24 +1,21 @@ import React from 'react'; -import { StyleSheet } from 'react-native'; +import { Hex } from '@metamask/utils'; +import { Text, View } from 'react-native'; -import { strings } from '../../../../../../../../locales/i18n'; import { parseSanitizeTypedDataMessage } from '../../../../utils/signatures'; +import { strings } from '../../../../../../../../locales/i18n'; +import { useSignatureRequest } from '../../../../hooks/useSignatureRequest'; +import { useStyles } from '../../../../../../../component-library/hooks'; import InfoRow from '../../../UI/InfoRow'; import DataTree from '../../DataTree'; import SignatureMessageSection from '../../SignatureMessageSection'; import { DataTreeInput } from '../../DataTree/DataTree'; -import { useSignatureRequest } from '../../../../hooks/useSignatureRequest'; -import { Hex } from '@metamask/utils'; - -const styles = StyleSheet.create({ - collpasedInfoRow: { - marginStart: -8, - }, -}); +import styleSheet from './Message.styles'; const Message = () => { const signatureRequest = useSignatureRequest(); const chainId = signatureRequest?.chainId as Hex; + const { styles } = useStyles(styleSheet, {}); // Pending alignment of controller types. // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -42,10 +39,19 @@ const Message = () => { } messageExpanded={ - + + {strings('confirm.message')} + + {primaryType} + + + } copyMessageText={typedSignData} /> diff --git a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/TypedSignV3V4.test.tsx b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/TypedSignV3V4.test.tsx index 1614205a6a8..b02a9f7a8dd 100644 --- a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/TypedSignV3V4.test.tsx +++ b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/TypedSignV3V4.test.tsx @@ -22,7 +22,7 @@ describe('TypedSignV3V4', () => { state: typedSignV3ConfirmationState, }); fireEvent.press(getByText('Message')); - expect(getAllByText('Message')).toHaveLength(2); + expect(getAllByText('Message')).toHaveLength(3); expect(getByText('From')).toBeDefined(); expect(getByText('Cow')).toBeDefined(); expect(getByText('To')).toBeDefined(); diff --git a/app/components/Views/confirmations/components/Confirm/NoChangeSimulation/NoChangeSimulation.tsx b/app/components/Views/confirmations/components/Confirm/NoChangeSimulation/NoChangeSimulation.tsx index f17f6ac0aad..a62bf20c7ca 100644 --- a/app/components/Views/confirmations/components/Confirm/NoChangeSimulation/NoChangeSimulation.tsx +++ b/app/components/Views/confirmations/components/Confirm/NoChangeSimulation/NoChangeSimulation.tsx @@ -6,6 +6,7 @@ import { selectUseTransactionSimulations } from '../../../../../../selectors/pre import InfoSection from '../../UI/InfoRow/InfoSection'; import InfoRow from '../../UI/InfoRow'; +// todo: this component can be deleted if not used anywhere const NoChangeSimulation = () => { const useTransactionSimulations = useSelector( selectUseTransactionSimulations, diff --git a/app/components/Views/confirmations/components/Confirm/SignatureMessageSection/SignatureMessageSection.styles.ts b/app/components/Views/confirmations/components/Confirm/SignatureMessageSection/SignatureMessageSection.styles.ts index f48bc62161d..d06bd8b4410 100644 --- a/app/components/Views/confirmations/components/Confirm/SignatureMessageSection/SignatureMessageSection.styles.ts +++ b/app/components/Views/confirmations/components/Confirm/SignatureMessageSection/SignatureMessageSection.styles.ts @@ -29,9 +29,12 @@ const styleSheet = (params: { theme: Theme }) => { }, messageContainer: { backgroundColor: theme.colors.background.default, - padding: 16, borderRadius: 8, minHeight: 200, + maxHeight: 300, + }, + scrollableSection: { + padding: 16, }, messageExpanded: { color: theme.colors.text.default, diff --git a/app/components/Views/confirmations/components/Confirm/SignatureMessageSection/SignatureMessageSection.tsx b/app/components/Views/confirmations/components/Confirm/SignatureMessageSection/SignatureMessageSection.tsx index 23542c6992e..dcde1d6a851 100644 --- a/app/components/Views/confirmations/components/Confirm/SignatureMessageSection/SignatureMessageSection.tsx +++ b/app/components/Views/confirmations/components/Confirm/SignatureMessageSection/SignatureMessageSection.tsx @@ -1,5 +1,5 @@ import React, { ReactNode } from 'react'; -import { Text, View } from 'react-native'; +import { ScrollView, Text, TouchableOpacity, View } from 'react-native'; import { strings } from '../../../../../../../locales/i18n'; import { useStyles } from '../../../../../../component-library/hooks'; @@ -42,7 +42,11 @@ const SignatureMessageSection = ({ - {messageExpanded} + + + {messageExpanded} + + } expandedContentTitle={strings('confirm.message')} diff --git a/app/components/Views/confirmations/components/Confirm/Title/Title.styles.ts b/app/components/Views/confirmations/components/Confirm/Title/Title.styles.ts index fb63842a8b0..a54e96609fc 100644 --- a/app/components/Views/confirmations/components/Confirm/Title/Title.styles.ts +++ b/app/components/Views/confirmations/components/Confirm/Title/Title.styles.ts @@ -17,6 +17,13 @@ const styleSheet = (params: { theme: Theme }) => { fontWeight: '700', textAlign: 'center', }, + subTitle: { + color: theme.colors.text.default, + fontSize: 14, + fontWeight: '400', + marginTop: 8, + textAlign: 'center', + }, }); }; diff --git a/app/components/Views/confirmations/components/Confirm/Title/Title.test.tsx b/app/components/Views/confirmations/components/Confirm/Title/Title.test.tsx index 6ff2c84c9cb..008311f7ff3 100644 --- a/app/components/Views/confirmations/components/Confirm/Title/Title.test.tsx +++ b/app/components/Views/confirmations/components/Confirm/Title/Title.test.tsx @@ -5,10 +5,13 @@ import { personalSignatureConfirmationState } from '../../../../../../util/test/ import Title from './Title'; describe('Title', () => { - it('should render correct title for personal sign request', async () => { + it('should render correct title and subtitle for personal sign request', async () => { const { getByText } = renderWithProvider(, { state: personalSignatureConfirmationState, }); expect(getByText('Signature request')).toBeDefined(); + expect( + getByText('Review request details before you confirm.'), + ).toBeDefined(); }); }); diff --git a/app/components/Views/confirmations/components/Confirm/Title/Title.tsx b/app/components/Views/confirmations/components/Confirm/Title/Title.tsx index 2f8fdf74148..6689857a9f9 100644 --- a/app/components/Views/confirmations/components/Confirm/Title/Title.tsx +++ b/app/components/Views/confirmations/components/Confirm/Title/Title.tsx @@ -7,13 +7,16 @@ import { useStyles } from '../../../../../../component-library/hooks'; import useApprovalRequest from '../../../hooks/useApprovalRequest'; import styleSheet from './Title.styles'; -const getTitle = (confirmationType?: string) => { +const getTitleAndSubTitle = (confirmationType?: string) => { switch (confirmationType) { case TransactionType.personalSign: case TransactionType.signTypedData: - return strings('confirm.title.signature'); + return { + title: strings('confirm.title.signature'), + subTitle: strings('confirm.sub_title.signature'), + }; default: - return ''; + return {}; } }; @@ -21,11 +24,12 @@ const Title = () => { const { approvalRequest } = useApprovalRequest(); const { styles } = useStyles(styleSheet, {}); - const title = getTitle(approvalRequest?.type); + const { title, subTitle } = getTitleAndSubTitle(approvalRequest?.type); return ( <View style={styles.titleContainer}> <Text style={styles.title}>{title}</Text> + <Text style={styles.subTitle}>{subTitle}</Text> </View> ); }; diff --git a/app/components/Views/confirmations/components/TypedSign/index.js b/app/components/Views/confirmations/components/TypedSign/index.js index fd802b80ec1..04953a7865e 100644 --- a/app/components/Views/confirmations/components/TypedSign/index.js +++ b/app/components/Views/confirmations/components/TypedSign/index.js @@ -248,7 +248,7 @@ class TypedSign extends PureComponent { showExpandedMessage, toggleExpandedMessage, messageParams: { from }, - networkType + networkType, } = this.props; const { truncateMessage } = this.state; const messageWrapperStyles = []; @@ -303,7 +303,10 @@ class TypedSign extends PureComponent { TypedSign.contextType = ThemeContext; const mapStateToProps = (state, ownProps) => { - const signatureRequest = selectSignatureRequestById(state, ownProps.messageParams.metamaskId); + const signatureRequest = selectSignatureRequestById( + state, + ownProps.messageParams.metamaskId, + ); return { networkType: selectNetworkTypeByChainId(state, signatureRequest?.chainId), diff --git a/app/components/Views/confirmations/components/UI/BottomModal/BottomModal.styles.ts b/app/components/Views/confirmations/components/UI/BottomModal/BottomModal.styles.ts new file mode 100644 index 00000000000..19c3c369449 --- /dev/null +++ b/app/components/Views/confirmations/components/UI/BottomModal/BottomModal.styles.ts @@ -0,0 +1,28 @@ +import { StyleSheet } from 'react-native'; + +import { Theme } from '../../../../../../util/theme/models'; + +const styleSheet = (params: { theme: Theme }) => { + const { theme } = params; + + return StyleSheet.create({ + bottomModal: { + justifyContent: 'flex-end', + margin: 0, + }, + topBar: { + alignSelf: 'center', + backgroundColor: theme.colors.background.alternativePressed, + borderRadius: 4, + height: 4, + marginBottom: -8, + width: 56, + zIndex: 1, + }, + wrapper: { + justifyContent: 'flex-end', + }, + }); +}; + +export default styleSheet; diff --git a/app/components/Views/confirmations/components/UI/BottomModal/BottomModal.tsx b/app/components/Views/confirmations/components/UI/BottomModal/BottomModal.tsx index c7b5e0ab7ab..adef046bb01 100644 --- a/app/components/Views/confirmations/components/UI/BottomModal/BottomModal.tsx +++ b/app/components/Views/confirmations/components/UI/BottomModal/BottomModal.tsx @@ -1,8 +1,10 @@ import React, { ReactChild } from 'react'; import Modal from 'react-native-modal'; -import { StyleSheet } from 'react-native'; +import { View } from 'react-native'; import { useTheme } from '../../../../../../util/theme'; +import { useStyles } from '../../../../../hooks/useStyles'; +import styleSheet from './BottomModal.styles'; const OPAQUE_GRAY = '#414141'; interface BottomModalProps { @@ -11,15 +13,13 @@ interface BottomModalProps { hideBackground?: boolean; } -const styles = StyleSheet.create({ - bottomModal: { - justifyContent: 'flex-end', - margin: 0, - }, -}); - -const BottomModal = ({ children, hideBackground, onClose }: BottomModalProps) => { +const BottomModal = ({ + children, + hideBackground, + onClose, +}: BottomModalProps) => { const { colors } = useTheme(); + const { styles } = useStyles(styleSheet, {}); return ( <Modal @@ -36,7 +36,10 @@ const BottomModal = ({ children, hideBackground, onClose }: BottomModalProps) => swipeDirection={'down'} propagateSwipe > - {children} + <View style={styles.wrapper}> + <View style={styles.topBar} /> + {children} + </View> </Modal> ); }; diff --git a/app/components/Views/confirmations/components/UI/BottomModal/__snapshots__/BottomModal.test.tsx.snap b/app/components/Views/confirmations/components/UI/BottomModal/__snapshots__/BottomModal.test.tsx.snap index 6325a757835..4a109689293 100644 --- a/app/components/Views/confirmations/components/UI/BottomModal/__snapshots__/BottomModal.test.tsx.snap +++ b/app/components/Views/confirmations/components/UI/BottomModal/__snapshots__/BottomModal.test.tsx.snap @@ -114,10 +114,31 @@ exports[`BottomModal should match snapshot 1`] = ` swipeDirection="down" swipeThreshold={100} > - <View> - <Text> - DUMMY - </Text> + <View + style={ + { + "justifyContent": "flex-end", + } + } + > + <View + style={ + { + "alignSelf": "center", + "backgroundColor": "#dbe0e6", + "borderRadius": 4, + "height": 4, + "marginBottom": -8, + "width": 56, + "zIndex": 1, + } + } + /> + <View> + <Text> + DUMMY + </Text> + </View> </View> </View> </Modal> diff --git a/app/components/Views/confirmations/components/UI/ExpandableSection/ExpandableSection.styles.ts b/app/components/Views/confirmations/components/UI/ExpandableSection/ExpandableSection.styles.ts index c63455bac25..841ef8c7e7a 100644 --- a/app/components/Views/confirmations/components/UI/ExpandableSection/ExpandableSection.styles.ts +++ b/app/components/Views/confirmations/components/UI/ExpandableSection/ExpandableSection.styles.ts @@ -9,9 +9,7 @@ const styleSheet = (params: { theme: Theme }) => { return StyleSheet.create({ container: { backgroundColor: theme.colors.background.default, - borderColor: theme.colors.border.muted, borderRadius: 8, - borderWidth: 1, display: 'flex', flexDirection: 'row', justifyContent: 'space-between', diff --git a/app/components/Views/confirmations/components/UI/InfoRow/InfoSection/InfoSection.styles.ts b/app/components/Views/confirmations/components/UI/InfoRow/InfoSection/InfoSection.styles.ts index 09d645493f5..65eb15b65dd 100644 --- a/app/components/Views/confirmations/components/UI/InfoRow/InfoSection/InfoSection.styles.ts +++ b/app/components/Views/confirmations/components/UI/InfoRow/InfoSection/InfoSection.styles.ts @@ -8,9 +8,7 @@ const styleSheet = (params: { theme: Theme }) => { return StyleSheet.create({ container: { backgroundColor: theme.colors.background.default, - borderColor: theme.colors.border.muted, borderRadius: 8, - borderWidth: 1, padding: 8, marginBottom: 8, }, diff --git a/app/components/Views/confirmations/components/UI/InfoRow/InfoSection/InfoSection.test.tsx b/app/components/Views/confirmations/components/UI/InfoRow/InfoSection/InfoSection.test.tsx index b46df49d5d0..f2794e7ade5 100644 --- a/app/components/Views/confirmations/components/UI/InfoRow/InfoSection/InfoSection.test.tsx +++ b/app/components/Views/confirmations/components/UI/InfoRow/InfoSection/InfoSection.test.tsx @@ -5,14 +5,14 @@ import { render } from '@testing-library/react-native'; import InfoSection from './index'; describe('InfoSection', () => { - it('should match snapshot for simple text value', async () => { - const container = render( + it('should render text passed correctly', async () => { + const { getByText } = render( <InfoSection> <View> <Text>Test</Text> </View> </InfoSection>, ); - expect(container).toMatchSnapshot(); + expect(getByText('Test')).toBeDefined(); }); }); diff --git a/app/components/Views/confirmations/components/UI/InfoRow/InfoSection/__snapshots__/InfoSection.test.tsx.snap b/app/components/Views/confirmations/components/UI/InfoRow/InfoSection/__snapshots__/InfoSection.test.tsx.snap deleted file mode 100644 index af5a0b9e505..00000000000 --- a/app/components/Views/confirmations/components/UI/InfoRow/InfoSection/__snapshots__/InfoSection.test.tsx.snap +++ /dev/null @@ -1,22 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`InfoSection should match snapshot for simple text value 1`] = ` -<View - style={ - { - "backgroundColor": "#ffffff", - "borderColor": "#bbc0c566", - "borderRadius": 8, - "borderWidth": 1, - "marginBottom": 8, - "padding": 8, - } - } -> - <View> - <Text> - Test - </Text> - </View> -</View> -`; diff --git a/app/components/Views/confirmations/hooks/useAccountInfo.test.ts b/app/components/Views/confirmations/hooks/useAccountInfo.test.ts index 7e4c64c233f..9c06a1c67ab 100644 --- a/app/components/Views/confirmations/hooks/useAccountInfo.test.ts +++ b/app/components/Views/confirmations/hooks/useAccountInfo.test.ts @@ -7,6 +7,10 @@ import { createMockAccountsControllerState } from '../../../../util/test/account import { RootState } from '../../../../reducers'; import useAccountInfo from './useAccountInfo'; +jest.mock('../../../../core/Engine', () => ({ + getTotalFiatAccountBalance: () => ({ tokenFiat: 10 }), +})); + const MOCK_ADDRESS = '0x0'; const MOCK_ACCOUNTS_CONTROLLER_STATE = createMockAccountsControllerState([ @@ -47,5 +51,6 @@ describe('useAccountInfo', () => { expect(result?.current?.accountName).toEqual('Account 1'); expect(result?.current?.accountAddress).toEqual('0x0'); expect(result?.current?.accountBalance).toEqual('< 0.00001 ETH'); + expect(result?.current?.accountFiatBalance).toEqual('$10'); }); }); diff --git a/app/components/Views/confirmations/hooks/useAccountInfo.ts b/app/components/Views/confirmations/hooks/useAccountInfo.ts index d07991f2f7d..66a1d18db7d 100644 --- a/app/components/Views/confirmations/hooks/useAccountInfo.ts +++ b/app/components/Views/confirmations/hooks/useAccountInfo.ts @@ -2,9 +2,12 @@ import { toChecksumAddress } from 'ethereumjs-util'; import { useMemo } from 'react'; import { useSelector } from 'react-redux'; +import Engine from '../../../../core/Engine'; import useAddressBalance from '../../../../components/hooks/useAddressBalance/useAddressBalance'; import { selectInternalAccounts } from '../../../../selectors/accountsController'; import { renderAccountName } from '../../../../util/address'; +import { renderFiat } from '../../../../util/number'; +import { selectCurrentCurrency } from '../../../../selectors/currencyRateController'; const useAccountInfo = (address: string) => { const internalAccounts = useSelector(selectInternalAccounts); @@ -13,6 +16,12 @@ const useAccountInfo = (address: string) => { undefined, address, ); + const currentCurrency = useSelector(selectCurrentCurrency); + const balance = Engine.getTotalFiatAccountBalance(); + const accountFiatBalance = `${renderFiat( + balance.tokenFiat, + currentCurrency, + )}`; const accountName = useMemo( () => @@ -20,7 +29,12 @@ const useAccountInfo = (address: string) => { [internalAccounts, activeAddress], ); - return { accountName, accountAddress: activeAddress, accountBalance }; + return { + accountName, + accountAddress: activeAddress, + accountBalance, + accountFiatBalance, + }; }; export default useAccountInfo; diff --git a/app/components/Views/confirmations/hooks/useSignatureRequest.ts b/app/components/Views/confirmations/hooks/useSignatureRequest.ts index 88c530d0842..dbf33417736 100644 --- a/app/components/Views/confirmations/hooks/useSignatureRequest.ts +++ b/app/components/Views/confirmations/hooks/useSignatureRequest.ts @@ -23,5 +23,5 @@ export function useSignatureRequest() { return undefined; } - return signatureRequest; + return signatureRequest; } diff --git a/app/util/url/index.ts b/app/util/url/index.ts index dc6e4711152..c94631f249e 100644 --- a/app/util/url/index.ts +++ b/app/util/url/index.ts @@ -3,10 +3,11 @@ import AppConstants from '../../core/AppConstants'; /** * "Use require('punycode/') to import userland modules rather than core modules." * {@see {@link https://github.com/mathiasbynens/punycode.js?tab=readme-ov-file#installation} -*/ + */ import { toASCII } from 'punycode/'; -const hostnameRegex = /^(?:[a-zA-Z][a-zA-Z0-9+.-]*:\/\/)?(?:www\.)?([^/?:]+)(?::\d+)?/; +const hostnameRegex = + /^(?:[a-zA-Z][a-zA-Z0-9+.-]*:\/\/)?(?:www\.)?([^/?:]+)(?::\d+)?/; export function isPortfolioUrl(url: string) { try { @@ -46,7 +47,9 @@ export const isValidASCIIURL = (urlString?: string) => { const punycodeHostname = toASCII(originalHostname?.[1] || ''); return originalHostname?.[1] === punycodeHostname; } catch (exp: unknown) { - console.error(`Failed to detect if URL hostname contains non-ASCII characters: ${urlString}. Error: ${exp}`); + console.error( + `Failed to detect if URL hostname contains non-ASCII characters: ${urlString}. Error: ${exp}`, + ); return false; } }; diff --git a/app/util/url/url.test.ts b/app/util/url/url.test.ts index e00f21f69c5..4eae044e112 100644 --- a/app/util/url/url.test.ts +++ b/app/util/url/url.test.ts @@ -1,4 +1,9 @@ -import { isPortfolioUrl, isBridgeUrl, isValidASCIIURL, toPunycodeURL } from './index'; +import { + isPortfolioUrl, + isBridgeUrl, + isValidASCIIURL, + toPunycodeURL, +} from './index'; import AppConstants from '../../core/AppConstants'; describe('URL Check Functions', () => { @@ -73,13 +78,19 @@ describe('URL Check Functions', () => { }); it('returns true for URL with its hostname containing ASCII characters and its path containing non-ASCII characters', () => { - expect(isValidASCIIURL('https://infura.io/gnosis?x=iոfura.io')).toStrictEqual(true); - expect(isValidASCIIURL('infura.io:7777/gnosis?x=iոfura.io')).toStrictEqual(true); + expect( + isValidASCIIURL('https://infura.io/gnosis?x=iոfura.io'), + ).toStrictEqual(true); + expect( + isValidASCIIURL('infura.io:7777/gnosis?x=iոfura.io'), + ).toStrictEqual(true); }); it('returns false for URL with its hostname containing non-ASCII characters', () => { expect(isValidASCIIURL('https://iոfura.io/gnosis')).toStrictEqual(false); - expect(isValidASCIIURL('iոfura.io:7777/gnosis?x=test')).toStrictEqual(false); + expect(isValidASCIIURL('iոfura.io:7777/gnosis?x=test')).toStrictEqual( + false, + ); }); it('returns false for empty string', () => { @@ -107,9 +118,9 @@ describe('URL Check Functions', () => { expect(toPunycodeURL('https://www.google.com')).toStrictEqual( 'https://www.google.com', ); - expect(toPunycodeURL('https://opensea.io/language=français')).toStrictEqual( - 'https://opensea.io/language=fran%C3%A7ais', - ); + expect( + toPunycodeURL('https://opensea.io/language=français'), + ).toStrictEqual('https://opensea.io/language=fran%C3%A7ais'); }); }); }); diff --git a/e2e/pages/Browser/PermissionSummaryBottomSheet.js b/e2e/pages/Browser/PermissionSummaryBottomSheet.js index 9668f35ef4f..1d9e94379b2 100644 --- a/e2e/pages/Browser/PermissionSummaryBottomSheet.js +++ b/e2e/pages/Browser/PermissionSummaryBottomSheet.js @@ -23,6 +23,18 @@ class PermissionSummaryBottomSheet { ); } + get ethereumMainnetText() { + return Matchers.getElementByText( + PermissionSummaryBottomSheetSelectorsText.ETHEREUM_MAINNET_LABEL, + ); + } + + get accountPermissionLabelContainer() { + return Matchers.getElementByID( + PermissionSummaryBottomSheetSelectorsIDs.ACCOUNT_PERMISSION_CONTAINER, + ); + } + async swipeToDismissModal() { await Gestures.swipe(this.container, 'down', 'fast'); } diff --git a/e2e/selectors/Browser/PermissionSummaryBottomSheet.selectors.js b/e2e/selectors/Browser/PermissionSummaryBottomSheet.selectors.js index 308f2e12963..4ebebd5dce7 100644 --- a/e2e/selectors/Browser/PermissionSummaryBottomSheet.selectors.js +++ b/e2e/selectors/Browser/PermissionSummaryBottomSheet.selectors.js @@ -3,9 +3,12 @@ import enContent from '../../../locales/languages/en.json'; export const PermissionSummaryBottomSheetSelectorsIDs = { CONTAINER: 'permission-summary-container', NETWORK_PERMISSIONS_CONTAINER: 'permission-network-permissions-container', + ACCOUNT_PERMISSION_CONTAINER: 'permission-summary-account-text', }; export const PermissionSummaryBottomSheetSelectorsText = { CONNECTED_ACCOUNTS_TEXT: enContent.accounts.connected_accounts_title, ADD_NETWORK_PERMISSION: enContent.permissions.title_add_network_permission, + ETHEREUM_MAINNET_LABEL: 'Ethereum Main Network', + ACCOUNT_ONE_LABEL: 'Account 1', }; diff --git a/e2e/specs/multichain/permission-system-summary-default-permissions.spec.js b/e2e/specs/multichain/permission-system-summary-default-permissions.spec.js new file mode 100644 index 00000000000..55a6a5fefeb --- /dev/null +++ b/e2e/specs/multichain/permission-system-summary-default-permissions.spec.js @@ -0,0 +1,63 @@ +'use strict'; +import TestHelpers from '../../helpers'; +import { SmokeMultiChainPermissions } from '../../tags'; +import Browser from '../../pages/Browser/BrowserView'; +import TabBarComponent from '../../pages/wallet/TabBarComponent'; +import ConnectedAccountsModal from '../../pages/Browser/ConnectedAccountsModal'; +import FixtureBuilder from '../../fixtures/fixture-builder'; +import { withFixtures } from '../../fixtures/fixture-helper'; +import { loginToApp } from '../../viewHelper'; +import Assertions from '../../utils/Assertions'; +import PermissionSummaryBottomSheet from '../../pages/Browser/PermissionSummaryBottomSheet'; +import { PermissionSummaryBottomSheetSelectorsText } from '../../selectors/Browser/PermissionSummaryBottomSheet.selectors'; + +describe( + SmokeMultiChainPermissions('Permission System - Default Permissions'), + () => { + beforeAll(async () => { + jest.setTimeout(150000); + await TestHelpers.reverseServerPort(); + }); + + it('should display default account and chain permissions in permission summary', async () => { + // Test setup with fixtures + await withFixtures( + { + dapp: true, + fixture: new FixtureBuilder() + .withPermissionControllerConnectedToTestDapp() + .withChainPermission() // Initialize with Ethereum mainnet only + .build(), + restartDevice: true, + }, + async () => { + // Step 1: Initial app setup + await loginToApp(); + await TabBarComponent.tapBrowser(); + await Browser.navigateToTestDApp(); + + // Step 2: Navigate to permissions management + await Browser.tapNetworkAvatarButtonOnBrowser(); + await ConnectedAccountsModal.tapManagePermissionsButton(); + + // Step 3: Verify account permissions + const accountLabelElement = + await PermissionSummaryBottomSheet.accountPermissionLabelContainer; + const accountLabelAttributes = + await accountLabelElement.getAttributes(); + const accountLabel = accountLabelAttributes.label; + + await Assertions.checkIfTextMatches( + accountLabel, + PermissionSummaryBottomSheetSelectorsText.ACCOUNT_ONE_LABEL, + ); + + // Step 4: Verify chain permissions + await Assertions.checkIfVisible( + PermissionSummaryBottomSheet.ethereumMainnetText, + ); + }, + ); + }); + }, +); diff --git a/locales/languages/de.json b/locales/languages/de.json index 02a01f48128..1b4e9588e65 100644 --- a/locales/languages/de.json +++ b/locales/languages/de.json @@ -3578,7 +3578,6 @@ "account": "Konto", "balance": "Kontostand", "network": "Netzwerk", - "rpc_url": "RPC-URL", "simulation": { "title": "Geschätzte Änderungen", "personal_sign_info": "Sie melden sich bei einer Website an und es sind keine Änderungen an Ihrem Konto vorgesehen.", diff --git a/locales/languages/el.json b/locales/languages/el.json index 88b72057932..f9ad9ac0de3 100644 --- a/locales/languages/el.json +++ b/locales/languages/el.json @@ -3578,7 +3578,6 @@ "account": "Λογαριασμός", "balance": "Υπόλοιπο", "network": "Δίκτυο", - "rpc_url": "Διεύθυνση URL του RPC", "simulation": { "title": "Εκτιμώμενες αλλαγές", "personal_sign_info": "Συνδέεστε σε έναν ιστότοπο και δεν προβλέπονται αλλαγές στον λογαριασμό σας.", diff --git a/locales/languages/en.json b/locales/languages/en.json index 14b624e6fef..ef1821c1fff 100644 --- a/locales/languages/en.json +++ b/locales/languages/en.json @@ -3595,6 +3595,9 @@ "title": { "signature": "Signature request" }, + "sub_title": { + "signature": "Review request details before you confirm." + }, "request_from": "Request from", "message": "Message", "primary_type": "Primary type", @@ -3603,7 +3606,6 @@ "account": "Account", "balance": "Balance", "network": "Network", - "rpc_url": "RPC URL", "simulation": { "title": "Estimated changes", "personal_sign_info": "You’re signing into a site and there are no predicted changes to your account.", diff --git a/locales/languages/es.json b/locales/languages/es.json index 1234e6cf0ae..5e236dff020 100644 --- a/locales/languages/es.json +++ b/locales/languages/es.json @@ -3578,7 +3578,6 @@ "account": "Cuenta", "balance": "Saldo", "network": "Red", - "rpc_url": "URL de RPC", "simulation": { "title": "Cambios estimados", "personal_sign_info": "Está iniciando sesión en un sitio y no se prevén cambios en su cuenta.", diff --git a/locales/languages/fr.json b/locales/languages/fr.json index 5f8fc8bc382..63b029dfe4a 100644 --- a/locales/languages/fr.json +++ b/locales/languages/fr.json @@ -3578,7 +3578,6 @@ "account": "Compte", "balance": "Solde", "network": "Réseau", - "rpc_url": "URL de l’appel de procédure à distance (RPC)", "simulation": { "title": "Changements estimés", "personal_sign_info": "Vous êtes en train de vous connecter à un site. Aucun changement ne devrait être apporté à votre compte.", diff --git a/locales/languages/hi.json b/locales/languages/hi.json index 28ff5eca751..b5dd44ca7e6 100644 --- a/locales/languages/hi.json +++ b/locales/languages/hi.json @@ -3578,7 +3578,6 @@ "account": "अकाउंट", "balance": "बैलेंस", "network": "नेटवर्क", - "rpc_url": "RPC URL", "simulation": { "title": "अनुमानित बदलाव", "personal_sign_info": "आप किसी साइट पर साइन इन कर रहे हैं और आपके अकाउंट में कोई अनुमानित परिवर्तन नहीं हैं।", diff --git a/locales/languages/id.json b/locales/languages/id.json index 32131492cab..f57afde2be6 100644 --- a/locales/languages/id.json +++ b/locales/languages/id.json @@ -3578,7 +3578,6 @@ "account": "Akun", "balance": "Saldo", "network": "Jaringan", - "rpc_url": "URL RPC", "simulation": { "title": "Estimasi perubahan", "personal_sign_info": "Anda masuk ke sebuah situs dan tidak ada perkiraan perubahan pada akun Anda.", diff --git a/locales/languages/ja.json b/locales/languages/ja.json index abeb31db3fb..ba6d0496744 100644 --- a/locales/languages/ja.json +++ b/locales/languages/ja.json @@ -3578,7 +3578,6 @@ "account": "アカウント", "balance": "残高", "network": "ネットワーク", - "rpc_url": "RPC URL", "simulation": { "title": "予測される増減額", "personal_sign_info": "サイトにサインインしようとしていて、予想されるアカウントの変更はありません。", diff --git a/locales/languages/ko.json b/locales/languages/ko.json index 21a3e54da25..d6203dc0377 100644 --- a/locales/languages/ko.json +++ b/locales/languages/ko.json @@ -3578,7 +3578,6 @@ "account": "계정", "balance": "잔액", "network": "네트워크", - "rpc_url": "RPC URL", "simulation": { "title": "예상 변동 사항", "personal_sign_info": "사이트에 로그인 중이며 계정에 예상되는 변동 사항이 없습니다.", diff --git a/locales/languages/pt.json b/locales/languages/pt.json index 7f4891b9004..403249b8762 100644 --- a/locales/languages/pt.json +++ b/locales/languages/pt.json @@ -3578,7 +3578,6 @@ "account": "Conta", "balance": "Saldo", "network": "Rede", - "rpc_url": "URL da RPC", "simulation": { "title": "Alterações estimadas", "personal_sign_info": "Você está fazendo login em um site, e não há alterações previstas em sua conta.", diff --git a/locales/languages/ru.json b/locales/languages/ru.json index 44cbd3e2bdf..0a6e3da8ced 100644 --- a/locales/languages/ru.json +++ b/locales/languages/ru.json @@ -3578,7 +3578,6 @@ "account": "Счет", "balance": "Баланс", "network": "Сеть", - "rpc_url": "URL-адрес RPC", "simulation": { "title": "Прогнозируемые изменения", "personal_sign_info": "Вы входите на сайт, и в вашем счете не происходит никаких прогнозируемых изменений.", diff --git a/locales/languages/tl.json b/locales/languages/tl.json index 2638e7ef384..8800ea77f61 100644 --- a/locales/languages/tl.json +++ b/locales/languages/tl.json @@ -3578,7 +3578,6 @@ "account": "Account", "balance": "Balanse", "network": "Network", - "rpc_url": "URL ng RPC", "simulation": { "title": "Tinantyang mga pagbabago", "personal_sign_info": "Nagsa-sign in ka sa isang site at walang mga inaasahang pagbabago sa iyong account.", diff --git a/locales/languages/tr.json b/locales/languages/tr.json index e32ee63ce93..8247e48fcc8 100644 --- a/locales/languages/tr.json +++ b/locales/languages/tr.json @@ -3578,7 +3578,6 @@ "account": "Hesap", "balance": "Bakiye", "network": "Ağ", - "rpc_url": "RPC URL adresi", "simulation": { "title": "Tahmini değişiklikler", "personal_sign_info": "Bir siteye giriş yapıyorsunuz ve hesabınızda öngörülen herhangi bir değişiklik yok.", diff --git a/locales/languages/vi.json b/locales/languages/vi.json index 03ce4f2e941..9e795f80775 100644 --- a/locales/languages/vi.json +++ b/locales/languages/vi.json @@ -3578,7 +3578,6 @@ "account": "Tài khoản", "balance": "Số dư", "network": "Mạng", - "rpc_url": "URL RPC", "simulation": { "title": "Thay đổi ước tính", "personal_sign_info": "Bạn đang đăng nhập vào một trang web và dự kiến không có thay đổi nào đối với tài khoản của bạn.", diff --git a/locales/languages/zh.json b/locales/languages/zh.json index 648d2e195e7..8e349ded662 100644 --- a/locales/languages/zh.json +++ b/locales/languages/zh.json @@ -3578,7 +3578,6 @@ "account": "账户", "balance": "余额", "network": "网络", - "rpc_url": "RPC(远程过程调用)URL", "simulation": { "title": "预计变化", "personal_sign_info": "您正在登录某个网站,并且您的账户没有预期变化。", diff --git a/patches/@metamask+controller-utils+11.3.0.patch b/patches/@metamask+controller-utils+11.3.0.patch deleted file mode 100644 index 4da6407ddf9..00000000000 --- a/patches/@metamask+controller-utils+11.3.0.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/node_modules/@metamask/controller-utils/dist/types.cjs b/node_modules/@metamask/controller-utils/dist/types.cjs -index b8c00f2..6268fb0 100644 ---- a/node_modules/@metamask/controller-utils/dist/types.cjs -+++ b/node_modules/@metamask/controller-utils/dist/types.cjs -@@ -97,11 +97,11 @@ exports.BlockExplorerUrl = { - [BuiltInNetworkName.LineaMainnet]: 'https://lineascan.build', - }; - exports.NetworkNickname = { -- [BuiltInNetworkName.Mainnet]: 'Mainnet', -+ [BuiltInNetworkName.Mainnet]: 'Ethereum Mainnet', - [BuiltInNetworkName.Goerli]: 'Goerli', - [BuiltInNetworkName.Sepolia]: 'Sepolia', - [BuiltInNetworkName.LineaGoerli]: 'Linea Goerli', - [BuiltInNetworkName.LineaSepolia]: 'Linea Sepolia', -- [BuiltInNetworkName.LineaMainnet]: 'Linea Mainnet', -+ [BuiltInNetworkName.LineaMainnet]: 'Linea', - }; - //# sourceMappingURL=types.cjs.map