Skip to content

Commit

Permalink
fix: rm type import from asset-picker
Browse files Browse the repository at this point in the history
  • Loading branch information
micaelae committed Dec 16, 2024
1 parent d5a1a0d commit b23db36
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions ui/pages/bridge/prepare/bridge-input-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const BridgeInputGroup = ({
<AssetPicker
header={header}
visibleTabs={[TabName.TOKENS]}
asset={token ?? undefined}
asset={(token as never) ?? undefined}
onAssetChange={onAssetChange}
networkProps={networkProps}
customTokenListGenerator={customTokenListGenerator}
Expand All @@ -178,7 +178,7 @@ export const BridgeInputGroup = ({
<BridgeAssetPickerButton
onClick={onClickHandler}
networkImageSrc={networkImageSrc}
asset={token ?? undefined}
asset={(token as never) ?? undefined}
networkProps={networkProps}
/>
)
Expand Down
24 changes: 13 additions & 11 deletions ui/pages/bridge/types.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -29,12 +26,17 @@ export enum SortOrder {
ETA_ASC = 'time_descending',
}

export type BridgeToken =
| (AssetWithDisplayData<NativeAsset | ERC20Asset> & {
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 {
Expand Down

0 comments on commit b23db36

Please sign in to comment.