Skip to content

Commit

Permalink
refactor: replace ramp Box instances in SimulationValueDisplay w View
Browse files Browse the repository at this point in the history
  • Loading branch information
digiwand committed Jan 16, 2025
1 parent 435c9e6 commit 1e1baec
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
formatAmountMaxPrecision,
} from '../../../../../../../../../UI/SimulationDetails/formatAmount';

import Box from '../../../../../../../../../UI/Ramp/components/Box';
import Address from '../../../../../../UI/InfoRow/InfoValue/Address/Address';

import { selectContractExchangeRates } from '../../../../../../../../../../selectors/tokenRatesController';
Expand Down Expand Up @@ -137,8 +136,8 @@ const SimulationValueDisplay: React.FC<
}

return (
<Box style={styles.wrapper}>
<Box style={styles.flexRowTokenValueAndAddress}>
<View style={styles.wrapper}>
<View style={styles.flexRowTokenValueAndAddress}>
<View style={styles.valueAndAddress}>
<ButtonPill
onPress={handlePressTokenValue}
Expand All @@ -159,18 +158,18 @@ const SimulationValueDisplay: React.FC<
{tokenId && `#${tokenId}`}
</Text>
</ButtonPill>
<Box compact noBorder style={styles.tokenAddress}>
<View style={styles.tokenAddress}>
<Address address={tokenContract} chainId={chainId} />
</Box>
</View>
</View>
</Box>
<Box compact noBorder>
</View>
<View>
{/*
TODO - add fiat shorten prop after tooltip logic has been updated
{@see {@link https://github.com/MetaMask/metamask-mobile/issues/12656}
*/}
{fiatValue && <IndividualFiatDisplay fiatAmount={fiatValue} /* shorten*/ />}
</Box>
</View>
{hasValueModalOpen && (
/**
* TODO replace BottomModal instances with BottomSheet
Expand Down Expand Up @@ -201,7 +200,7 @@ const SimulationValueDisplay: React.FC<
</TouchableOpacity>
</BottomModal>
)}
</Box>
</View>
);
};

Expand Down

0 comments on commit 1e1baec

Please sign in to comment.