From ab0374d48a2002034692a2f9a05af3d3590cb96d Mon Sep 17 00:00:00 2001 From: Dhruv <79097544+dhruvv173@users.noreply.github.com> Date: Wed, 21 Jun 2023 03:44:45 +0530 Subject: [PATCH] Part of #18714: Replacing deprecated constants with enums (#19516) * replacing deprecated constants with enums * Removing redundant properties --- .../advanced-gas-fee-defaults.js | 9 +++-- .../contract-details-modal.js | 33 +++++++++---------- .../network-account-balance-header.js | 28 +++++++--------- 3 files changed, 31 insertions(+), 39 deletions(-) diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js index c4a57667d..033145d8a 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js @@ -6,8 +6,8 @@ import { EditGasModes } from '../../../../../shared/constants/gas'; import Box from '../../../ui/box'; import CheckBox from '../../../ui/check-box'; import { - DISPLAY, - FLEX_DIRECTION, + Display, + FlexDirection, TextColor, TextVariant, } from '../../../../helpers/constants/design-system'; @@ -72,8 +72,8 @@ const AdvancedGasFeeDefaults = () => { return ( { variant={TextVariant.bodySm} as="h6" color={TextColor.textAlternative} - margin={0} > {isDefaultSettingsSelected ? t('advancedGasFeeDefaultOptOut') diff --git a/ui/components/app/modals/contract-details-modal/contract-details-modal.js b/ui/components/app/modals/contract-details-modal/contract-details-modal.js index e6250a280..db14cb8bc 100644 --- a/ui/components/app/modals/contract-details-modal/contract-details-modal.js +++ b/ui/components/app/modals/contract-details-modal/contract-details-modal.js @@ -12,7 +12,7 @@ import Popover from '../../../ui/popover'; import { FontWeight, TextVariant, - DISPLAY, + Display, Size, BorderStyle, BorderColor, @@ -65,17 +65,16 @@ export default function ContractDetailsModal({ fontWeight={FontWeight.Bold} variant={TextVariant.bodyMd} as="h5" - display={DISPLAY.FLEX} - boxProps={{ marginTop: 0, marginBottom: 0 }} + display={Display.Flex} > {t('contractTitle')} {t('contractDescription')} @@ -84,14 +83,14 @@ export default function ContractDetailsModal({ {nft ? t('contractNFT') : t('contractToken')} {ellipsify(tokenAddress)} @@ -148,7 +146,7 @@ export default function ContractDetailsModal({ } > { @@ -189,7 +187,7 @@ export default function ContractDetailsModal({ @@ -200,7 +198,7 @@ export default function ContractDetailsModal({ t('contractRequestingSpendingCap')} {ellipsify(toAddress)} @@ -246,7 +243,7 @@ export default function ContractDetailsModal({ } > { @@ -284,7 +281,7 @@ export default function ContractDetailsModal({ @@ -60,15 +60,14 @@ export default function NetworkAccountBalanceHeader({ /> {networkName} @@ -78,22 +77,20 @@ export default function NetworkAccountBalanceHeader({ as="h6" color={TextColor.textDefault} fontWeight={FontWeight.Bold} - marginTop={0} > {accountName} {t('balance')} @@ -103,7 +100,6 @@ export default function NetworkAccountBalanceHeader({ as="h6" color={TextColor.textDefault} fontWeight={FontWeight.Bold} - marginTop={0} align={TextAlign.End} > {accountBalance} {tokenName}