diff --git a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/Static/Static.tsx b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/Static/Static.tsx index febb2b71115..44817681888 100644 --- a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/Static/Static.tsx +++ b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/Static/Static.tsx @@ -1,20 +1,15 @@ import React from 'react'; -import { StyleSheet, View } from 'react-native'; +import { ActivityIndicator, StyleSheet, View } from 'react-native'; import { useStyles } from '../../../../../../../../../component-library/hooks'; import InfoRow from '../../../../../UI/InfoRow'; import InfoSection from '../../../../../UI/InfoRow/InfoSection'; -import Loader from '../../../../../../../../../component-library/components-temp/Loader'; const styleSheet = () => StyleSheet.create({ base: { display: 'flex', justifyContent: 'space-between', }, - loaderContainer: { - display: 'flex', - justifyContent: 'center', - }, }); const StaticSimulation: React.FC<{ @@ -32,7 +27,7 @@ const StaticSimulation: React.FC<{ isLoading, isCollapsed = false, }) => { - const { styles } = useStyles(styleSheet, {}); + const { styles, theme } = useStyles(styleSheet, {}); return( @@ -41,9 +36,10 @@ const StaticSimulation: React.FC<{ {description} {isLoading ? ( - - - + ) : ( simulationElements )} diff --git a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/TypedSignDecoded/TypedSignDecoded.tsx b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/TypedSignDecoded/TypedSignDecoded.tsx index 2adc5d40fec..d51866173b2 100644 --- a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/TypedSignDecoded/TypedSignDecoded.tsx +++ b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/TypedSignDecoded/TypedSignDecoded.tsx @@ -110,20 +110,20 @@ const StateChangeRow = ({ (changeType === DecodingDataChangeType.Approve || changeType === DecodingDataChangeType.Revoke); - const changeLabel = shouldDisplayLabel + const labelChangeType = shouldDisplayLabel ? getStateChangeLabelMap(changeType, nftTransactionType) : ''; return ( {(assetType === TokenStandard.ERC20 || assetType === TokenStandard.ERC721 || assetType === TokenStandard.ERC1155) && ( )} diff --git a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/TypedSignPermit/TypedSignPermit.tsx b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/TypedSignPermit/TypedSignPermit.tsx index bb326cb1463..9594f48ed6e 100644 --- a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/TypedSignPermit/TypedSignPermit.tsx +++ b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/TypedSignPermit/TypedSignPermit.tsx @@ -95,7 +95,7 @@ const PermitSimulation = () => { ) => ( { ) : ( { it('renders component correctly', async () => { const { findByText } = renderWithProvider( , @@ -28,7 +28,7 @@ describe('NativeValueDisplay', () => { it('displays modal when clicking on the value', async () => { const { findByText } = renderWithProvider( , diff --git a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/components/NativeValueDisplay/NativeValueDisplay.tsx b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/components/NativeValueDisplay/NativeValueDisplay.tsx index 54ad3cd28e8..52c3073fee7 100644 --- a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/components/NativeValueDisplay/NativeValueDisplay.tsx +++ b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/components/NativeValueDisplay/NativeValueDisplay.tsx @@ -37,8 +37,8 @@ interface PermitSimulationValueDisplayParams { /** ID of the associated chain. */ chainId: Hex; - /** Change type to be displayed in value tooltip */ - labelChangeType: string; + /** Modal header text to be displayed in the value modal */ + modalHeaderText: string; /** The token amount */ value: number | string; @@ -54,7 +54,7 @@ const NativeValueDisplay: React.FC = ({ chainId, credit, debit, - labelChangeType, + modalHeaderText, value, }) => { const [hasValueModalOpen, setHasValueModalOpen] = useState(false); @@ -136,7 +136,7 @@ const NativeValueDisplay: React.FC = ({ iconName={IconName.ArrowLeft} /> - {labelChangeType} + {modalHeaderText} diff --git a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/components/ValueDisplay/ValueDisplay.test.tsx b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/components/ValueDisplay/ValueDisplay.test.tsx index 6881dbed1b1..dc6e376c363 100644 --- a/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/components/ValueDisplay/ValueDisplay.test.tsx +++ b/app/components/Views/confirmations/components/Confirm/Info/TypedSignV3V4/Simulation/components/ValueDisplay/ValueDisplay.test.tsx @@ -71,7 +71,7 @@ describe('SimulationValueDisplay', () => { const { findByText } = renderWithProvider( { const { findByTestId } = renderWithProvider( { const { findByText } = renderWithProvider( { renderWithProvider( { renderWithProvider( { it('does not invoke method to track missing decimal information', async () => { renderWithProvider( = ({ chainId, - labelChangeType, + modalHeaderText, networkClientId, primaryType, tokenContract, @@ -224,7 +224,7 @@ const SimulationValueDisplay: React.FC = ({ iconName={IconName.ArrowLeft} /> - {labelChangeType} + {modalHeaderText}