Skip to content

Commit 1583570

Browse files
authored
chore: move formatters file (#36267)
## **Description** Rename file and moved to the more appropriate hooks folder [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/36267?quickstart=1) ## **Changelog** CHANGELOG entry: Renamed formatters to useFormatters ## **Related issues** Fixes: ## **Manual testing steps** CI green ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent b3cec8d commit 1583570

File tree

13 files changed

+12
-12
lines changed

13 files changed

+12
-12
lines changed

ui/components/app/assets/account-group-balance-change/account-group-balance-change.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
Display,
66
TextVariant,
77
} from '../../../../helpers/constants/design-system';
8-
import { useFormatters } from '../../../../helpers/formatters';
8+
import { useFormatters } from '../../../../hooks/useFormatters';
99
import { getCurrentCurrency } from '../../../../ducks/metamask/metamask';
1010
import { getIsMultichainAccountsState2Enabled } from '../../../../selectors';
1111
import { Box, SensitiveText } from '../../../component-library';

ui/components/app/assets/account-group-balance/account-group-balance.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
} from '../../../component-library';
2121
import { getPreferences } from '../../../../selectors';
2222
import Spinner from '../../../ui/spinner';
23-
import { useFormatters } from '../../../../helpers/formatters';
23+
import { useFormatters } from '../../../../hooks/useFormatters';
2424
import { getCurrentCurrency } from '../../../../ducks/metamask/metamask';
2525
import { useI18nContext } from '../../../../hooks/useI18nContext';
2626

ui/components/app/assets/defi-list/defi-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import PulseLoader from '../../../ui/pulse-loader';
1919
import { Box } from '../../../component-library';
2020
import { useI18nContext } from '../../../../hooks/useI18nContext';
2121

22-
import { useFormatters } from '../../../../helpers/formatters';
22+
import { useFormatters } from '../../../../hooks/useFormatters';
2323
import { extractUniqueIconAndSymbols } from '../util/extractIconAndSymbol';
2424
import { getDefiPositions } from '../../../../selectors/assets';
2525
import { DeFiProtocolPosition } from '../types';

ui/components/app/assets/hooks/useTokenDisplayInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { formatWithThreshold } from '../util/formatWithThreshold';
1919
import { getIntlLocale } from '../../../../ducks/locale/locale';
2020
import { getCurrentCurrency } from '../../../../ducks/metamask/metamask';
2121
import { useMultichainSelector } from '../../../../hooks/useMultichainSelector';
22-
import { useFormatters } from '../../../../helpers/formatters';
22+
import { useFormatters } from '../../../../hooks/useFormatters';
2323
import { isEvmChainId } from '../../../../../shared/lib/asset-utils';
2424
import { getInternalAccountBySelectedAccountGroupAndCaip } from '../../../../selectors/multichain-accounts/account-tree';
2525

ui/components/app/wallet-overview/aggregated-percentage-overview-cross-chains.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { getCurrentCurrency } from '../../../ducks/metamask/metamask';
1616
// TODO: Remove restricted import
1717
// eslint-disable-next-line import/no-restricted-paths
1818
import { formatValue, isValidAmount } from '../../../../app/scripts/lib/util';
19-
import { useFormatters } from '../../../helpers/formatters';
19+
import { useFormatters } from '../../../hooks/useFormatters';
2020
import {
2121
Display,
2222
TextColor,

ui/components/app/wallet-overview/aggregated-percentage-overview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { Box, SensitiveText } from '../../component-library';
2525
import { getCalculatedTokenAmount1dAgo } from '../../../helpers/utils/util';
2626
import { getHistoricalMultichainAggregatedBalance } from '../../../selectors/assets';
2727
import { formatWithThreshold } from '../assets/util/formatWithThreshold';
28-
import { useFormatters } from '../../../helpers/formatters';
28+
import { useFormatters } from '../../../hooks/useFormatters';
2929

3030
// core already has this exported type but its not yet available in this version
3131
// todo remove this and use core type once available

ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
getSelectedAccountCachedBalance,
1515
getTokensMarketData,
1616
} from '../../../../../selectors';
17-
import { useFormatters } from '../../../../../helpers/formatters';
17+
import { useFormatters } from '../../../../../hooks/useFormatters';
1818
import { EtherDenomination } from '../../../../../../shared/constants/common';
1919
import { Numeric } from '../../../../../../shared/modules/Numeric';
2020
import {

ui/hooks/useCurrencyDisplay.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Numeric } from '../../shared/modules/Numeric';
1818
import { EtherDenomination } from '../../shared/constants/common';
1919
import { getTokenFiatAmount } from '../helpers/utils/token-util';
2020
import { getCurrencyRates } from '../ducks/metamask/metamask';
21-
import { useFormatters } from '../helpers/formatters';
21+
import { useFormatters } from './useFormatters';
2222
import { useMultichainSelector } from './useMultichainSelector';
2323

2424
// The smallest non-zero amount that can be displayed.
File renamed without changes.

ui/pages/asset/components/chart/asset-chart-price.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from '../../../../helpers/constants/design-system';
1010
import { Box, Text } from '../../../../components/component-library';
1111
import { loadingOpacity, getShortDateFormatter } from '../../util';
12-
import { useFormatters } from '../../../../helpers/formatters';
12+
import { useFormatters } from '../../../../hooks/useFormatters';
1313
import { Skeleton } from '../../../../components/component-library/skeleton';
1414
import { TokenCellPercentChange } from '../../../../components/app/assets/token-cell/cells';
1515
import { TokenFiatDisplayInfo } from '../../../../components/app/assets/types';

0 commit comments

Comments
 (0)