1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Part of #20163 for file ui\components\app\detected-token\detected-token-values\detected-token-values.js (#20537)

* Part of #20163 for file ui\components\app\detected-token\detected-token-values\detected-token-values.js

* Update ui/components/app/detected-token/detected-token-values/detected-token-values.js

---------

Co-authored-by: Garrett Bear <gwhisten@gmail.com>
This commit is contained in:
Harsh Shukla 2023-08-26 20:57:10 +05:30 committed by GitHub
parent 3044aa0ebe
commit a35df21b7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,8 +2,6 @@ import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
import CheckBox from '../../../ui/check-box';
import { import {
Display, Display,
TextColor, TextColor,
@ -12,7 +10,7 @@ import {
import { useTokenTracker } from '../../../../hooks/useTokenTracker'; import { useTokenTracker } from '../../../../hooks/useTokenTracker';
import { useTokenFiatAmount } from '../../../../hooks/useTokenFiatAmount'; import { useTokenFiatAmount } from '../../../../hooks/useTokenFiatAmount';
import { getUseCurrencyRateCheck } from '../../../../selectors'; import { getUseCurrencyRateCheck } from '../../../../selectors';
import { Box, Text } from '../../../component-library'; import { Box, Checkbox, Text } from '../../../component-library';
const DetectedTokenValues = ({ const DetectedTokenValues = ({
token, token,
@ -54,12 +52,15 @@ const DetectedTokenValues = ({
color={TextColor.textAlternative} color={TextColor.textAlternative}
> >
{useCurrencyRateCheck {useCurrencyRateCheck
? formattedFiatBalance || '$0' // since formattedFiatBalance will be when teh conversion rate is not obtained, should be replace the `$0` with `N/A` ? formattedFiatBalance || '$0' // since formattedFiatBalance will be when the conversion rate is not obtained, should replace the `$0` with `N/A`
: formattedFiatBalance} : formattedFiatBalance}
</Text> </Text>
</Box> </Box>
<Box className="detected-token-values__checkbox"> <Box className="detected-token-values__checkbox">
<CheckBox checked={tokenSelection} onClick={handleCheckBoxSelection} /> <Checkbox
isChecked={tokenSelection}
onClick={handleCheckBoxSelection}
/>
</Box> </Box>
</Box> </Box>
); );