From b23db36ef01650478381c947c9cd2fab3a773c0f Mon Sep 17 00:00:00 2001 From: Micaela Estabillo Date: Mon, 16 Dec 2024 09:54:34 -0800 Subject: [PATCH] fix: rm type import from asset-picker --- .../bridge/prepare/bridge-input-group.tsx | 4 ++-- ui/pages/bridge/types.ts | 24 ++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/ui/pages/bridge/prepare/bridge-input-group.tsx b/ui/pages/bridge/prepare/bridge-input-group.tsx index 16ecf9e1bf2b..c4502725c1ea 100644 --- a/ui/pages/bridge/prepare/bridge-input-group.tsx +++ b/ui/pages/bridge/prepare/bridge-input-group.tsx @@ -154,7 +154,7 @@ export const BridgeInputGroup = ({ ) diff --git a/ui/pages/bridge/types.ts b/ui/pages/bridge/types.ts index fede4d786866..d0eb45fa71a5 100644 --- a/ui/pages/bridge/types.ts +++ b/ui/pages/bridge/types.ts @@ -1,10 +1,7 @@ import { BigNumber } from 'bignumber.js'; +import { Hex } from '@metamask/utils'; import { ChainConfiguration } from '../../../shared/types/bridge'; -import { - AssetWithDisplayData, - ERC20Asset, - NativeAsset, -} from '../../components/multichain/asset-picker-amount/asset-picker-modal/types'; +import type { AssetType } from '../../../shared/constants/transaction'; export type L1GasFees = { l1GasFeesInHexWei?: string; // l1 fees for approval and trade in hex wei, appended by controller @@ -29,12 +26,17 @@ export enum SortOrder { ETA_ASC = 'time_descending', } -export type BridgeToken = - | (AssetWithDisplayData & { - aggregators?: string[]; - address: string; - }) - | null; +export type BridgeToken = { + type: AssetType.native | AssetType.token; + address: string; + symbol: string; + image: string; + decimals: number; + chainId: Hex; + balance: string; // raw balance + string: string | undefined; // normalized balance as a stringified number + tokenFiatAmount?: number | null; +} | null; // Types copied from Metabridge API export enum BridgeFlag {