Skip to content

Commit 3b6eed2

Browse files
Cherry-pick aa1ba84 in to 7.49.0 (#16126)
This PR cherry-picks aa1ba84 PR: #16117 --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
1 parent d7aec8a commit 3b6eed2

26 files changed

Lines changed: 18881 additions & 16016 deletions

File tree

app/components/Views/confirmations/components/info/contract-interaction/contract-interaction.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import { SimulationDetails } from '../../../../../UI/SimulationDetails/Simulatio
66
import { useConfirmationMetricEvents } from '../../../hooks/metrics/useConfirmationMetricEvents';
77
import { use7702TransactionType } from '../../../hooks/7702/use7702TransactionType';
88
import { useTransactionMetadataRequest } from '../../../hooks/transactions/useTransactionMetadataRequest';
9-
import AccountNetworkInfo from '../../rows/account-network-info-row';
9+
import AccountNetworkInfoRow from '../../rows/account-network-info-row';
1010
import OriginRow from '../../rows/origin-row';
1111
import AdvancedDetailsRow from '../../rows/transactions/advanced-details-row/advanced-details-row';
12-
import GasFeesDetails from '../../rows/transactions/gas-fee-details';
12+
import GasFeesDetailsRow from '../../rows/transactions/gas-fee-details-row';
1313
import SwitchAccountTypeInfoRow from '../../rows/switch-account-type-info-row';
1414

1515
const ContractInteraction = () => {
@@ -22,15 +22,15 @@ const ContractInteraction = () => {
2222

2323
return (
2424
<View>
25-
<AccountNetworkInfo />
25+
<AccountNetworkInfoRow />
2626
{isBatchedUpgrade && <SwitchAccountTypeInfoRow />}
2727
<SimulationDetails
2828
transaction={transactionMetadata as TransactionMeta}
2929
enableMetrics={false}
3030
isTransactionsRedesign
3131
/>
3232
<OriginRow isSignatureRequest={false} />
33-
<GasFeesDetails />
33+
<GasFeesDetailsRow />
3434
<AdvancedDetailsRow />
3535
</View>
3636
);

app/components/Views/confirmations/components/info/personal-sign/personal-sign.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

33
import useApprovalRequest from '../../../hooks/useApprovalRequest';
4-
import AccountNetworkInfo from '../../rows/account-network-info-row';
4+
import AccountNetworkInfoRow from '../../rows/account-network-info-row';
55
import OriginRow from '../../rows/origin-row';
66
import Message from './message';
77

@@ -14,7 +14,7 @@ const PersonalSign = () => {
1414

1515
return (
1616
<>
17-
<AccountNetworkInfo />
17+
<AccountNetworkInfoRow />
1818
<OriginRow isSignatureRequest />
1919
<Message />
2020
</>

app/components/Views/confirmations/components/info/switch-account-type/switch-account-type.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import React, { useEffect } from 'react';
22
import { View } from 'react-native';
33

44
import { useConfirmationMetricEvents } from '../../../hooks/metrics/useConfirmationMetricEvents';
5-
import AccountNetworkInfo from '../../rows/account-network-info-row';
5+
import AccountNetworkInfoRow from '../../rows/account-network-info-row';
66
import AdvancedDetailsRow from '../../rows/transactions/advanced-details-row/advanced-details-row';
7-
import GasFeesDetails from '../../rows/transactions/gas-fee-details';
7+
import GasFeesDetailsRow from '../../rows/transactions/gas-fee-details-row';
88
import SwitchAccountTypeInfoRow from '../../rows/switch-account-type-info-row';
99

1010
const SwitchAccountType = () => {
@@ -13,9 +13,9 @@ const SwitchAccountType = () => {
1313

1414
return (
1515
<View>
16-
<AccountNetworkInfo />
16+
<AccountNetworkInfoRow />
1717
<SwitchAccountTypeInfoRow />
18-
<GasFeesDetails />
18+
<GasFeesDetailsRow />
1919
<AdvancedDetailsRow />
2020
</View>
2121
);

app/components/Views/confirmations/components/info/transfer/transfer.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import { useMaxValueRefresher } from '../../../hooks/useMaxValueRefresher';
1313
import { useTokenAmount } from '../../../hooks/useTokenAmount';
1414
import { useTransferAssetType } from '../../../hooks/useTransferAssetType';
1515
import { HeroRow } from '../../rows/transactions/hero-row';
16-
import FromTo from '../../rows/transactions/from-to';
17-
import GasFeesDetails from '../../rows/transactions/gas-fee-details';
18-
import AdvancedDetailsRow from '../../rows/transactions/advanced-details-row/advanced-details-row';
19-
import NetworkRow from '../../rows/transactions/network-row';
16+
import { NetworkAndOriginRow } from '../../rows/transactions/network-and-origin-row';
17+
import FromToRow from '../../rows/transactions/from-to-row';
18+
import GasFeesDetailsRow from '../../rows/transactions/gas-fee-details-row';
19+
import AdvancedDetailsRow from '../../rows/transactions/advanced-details-row';
2020

2121
const Transfer = () => {
2222
// Set navbar as first to prevent Android navigation flickering
@@ -43,16 +43,16 @@ const Transfer = () => {
4343
return (
4444
<View>
4545
<HeroRow />
46-
<FromTo />
47-
<NetworkRow />
46+
<FromToRow />
47+
<NetworkAndOriginRow />
4848
{isDappTransfer && (
4949
<SimulationDetails
5050
transaction={transactionMetadata as TransactionMeta}
5151
enableMetrics
5252
isTransactionsRedesign
5353
/>
5454
)}
55-
<GasFeesDetails />
55+
<GasFeesDetailsRow />
5656
<AdvancedDetailsRow />
5757
</View>
5858
);

app/components/Views/confirmations/components/info/typed-sign-v1/typed-sign-v1.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

33
import useApprovalRequest from '../../../hooks/useApprovalRequest';
4-
import AccountNetworkInfo from '../../rows/account-network-info-row';
4+
import AccountNetworkInfoRow from '../../rows/account-network-info-row';
55
import OriginRow from '../../rows/origin-row';
66
import Message from './message';
77

@@ -14,7 +14,7 @@ const TypedSignV1 = () => {
1414

1515
return (
1616
<>
17-
<AccountNetworkInfo />
17+
<AccountNetworkInfoRow />
1818
<OriginRow isSignatureRequest />
1919
<Message />
2020
</>

app/components/Views/confirmations/components/info/typed-sign-v3v4/typed-sign-v3v4.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React from 'react';
2-
import AccountNetworkInfo from '../../rows/account-network-info-row';
2+
import AccountNetworkInfoRow from '../../rows/account-network-info-row';
33
import { InfoSectionOriginAndDetails } from './info-section-origin-and-details';
44
import Message from './message';
55
import TypedSignV3V4Simulation from './simulation';
66

77
const TypedSignV3V4 = () => (
88
<>
9-
<AccountNetworkInfo />
9+
<AccountNetworkInfoRow />
1010
<TypedSignV3V4Simulation />
1111
<InfoSectionOriginAndDetails />
1212
<Message />
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './advanced-details-row';

app/components/Views/confirmations/components/rows/transactions/from-to/from-to.styles.ts renamed to app/components/Views/confirmations/components/rows/transactions/from-to-row/from-to-row.styles.ts

File renamed without changes.

app/components/Views/confirmations/components/rows/transactions/from-to/from-to.test.tsx renamed to app/components/Views/confirmations/components/rows/transactions/from-to-row/from-to-row.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { TransactionType } from '@metamask/transaction-controller';
55
import renderWithProvider from '../../../../../../../util/test/renderWithProvider';
66
import { transferConfirmationState } from '../../../../../../../util/test/confirm-data-helpers';
77
import { useConfirmationMetricEvents } from '../../../../hooks/metrics/useConfirmationMetricEvents';
8-
import FromTo from './from-to';
8+
import FromToRow from './from-to-row';
99

1010
jest.mock('../../../../hooks/metrics/useConfirmationMetricEvents');
1111
jest.mock('../../../../../../../core/Engine', () => ({
@@ -56,7 +56,7 @@ const erc20TransferState = merge({}, transferConfirmationState, {
5656
},
5757
});
5858

59-
describe('FromTo', () => {
59+
describe('FromToRow', () => {
6060
const useConfirmationMetricEventsMock = jest.mocked(
6161
useConfirmationMetricEvents,
6262
);
@@ -69,7 +69,7 @@ describe('FromTo', () => {
6969
});
7070

7171
it('displays the correct addresses for native transfer', async () => {
72-
const { getByText } = renderWithProvider(<FromTo />, {
72+
const { getByText } = renderWithProvider(<FromToRow />, {
7373
state: nativeTransferState,
7474
});
7575

@@ -78,7 +78,7 @@ describe('FromTo', () => {
7878
});
7979

8080
it('displays the correct addresses for erc20 transfer', async () => {
81-
const { getByText } = renderWithProvider(<FromTo />, {
81+
const { getByText } = renderWithProvider(<FromToRow />, {
8282
state: erc20TransferState,
8383
});
8484

app/components/Views/confirmations/components/rows/transactions/from-to/from-to.tsx renamed to app/components/Views/confirmations/components/rows/transactions/from-to-row/from-to-row.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import Icon, {
1313
import { NameType } from '../../../../../../UI/Name/Name.types';
1414
import { useTransferRecipient } from '../../../../hooks/transactions/useTransferRecipient';
1515
import InfoSection from '../../../UI/info-row/info-section';
16-
import styleSheet from './from-to.styles';
16+
import styleSheet from './from-to-row.styles';
1717

18-
const FromTo = () => {
18+
const FromToRow = () => {
1919
const { styles } = useStyles(styleSheet, {});
2020
const transactionMetadata = useTransactionMetadataRequest();
2121
const transferRecipient = useTransferRecipient();
@@ -61,4 +61,4 @@ const FromTo = () => {
6161
);
6262
};
6363

64-
export default FromTo;
64+
export default FromToRow;

0 commit comments

Comments
 (0)