diff --git a/packages/plugins/Flow/src/UI/Web3State/index.ts b/packages/plugins/Flow/src/UI/Web3State/index.ts index 6e22d68f829c..4ecd62162222 100644 --- a/packages/plugins/Flow/src/UI/Web3State/index.ts +++ b/packages/plugins/Flow/src/UI/Web3State/index.ts @@ -7,10 +7,10 @@ import { resolveAddressLinkOnExplorer, } from '@masknet/web3-shared-flow' import { createConstantSubscription, mapSubscription } from '@masknet/shared-base' +import { toFixed } from '@masknet/web3-shared-base' import { getStorage, StorageDefaultValue } from '../../storage' import { formatAddress } from '../../helpers' import { getFungibleAssets } from '../../apis' -import { toFixed } from '@masknet/web3-shared-base' function createSubscriptionFromChainId(getter: (value: typeof StorageDefaultValue.chainId) => T) { return mapSubscription(getStorage().chainId.subscription, getter) @@ -50,7 +50,7 @@ export function createWeb3State(signal: AbortSignal): Web3Plugin.ObjectCapabilit Utils: { formatAddress, formatBalance: toFixed, - formatCurrency: toFixed, + formatCurrency: (value) => toFixed(value), isChainIdValid: () => true, diff --git a/packages/plugins/Solana/src/UI/Web3State/index.ts b/packages/plugins/Solana/src/UI/Web3State/index.ts index bea02126b0bc..6c537764db89 100644 --- a/packages/plugins/Solana/src/UI/Web3State/index.ts +++ b/packages/plugins/Solana/src/UI/Web3State/index.ts @@ -50,7 +50,7 @@ export function createWeb3State(signal: AbortSignal): Web3Plugin.ObjectCapabilit Utils: { formatAddress, formatBalance: toFixed, - formatCurrency: toFixed, + formatCurrency: (value) => toFixed(value), isChainIdValid: () => true,