Skip to content

Commit

Permalink
fix: mf-5278 connet wallet dialog (#10856)
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleBill committed Sep 26, 2023
1 parent 7b17f14 commit 9f16d65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/mask/src/extension/popups/pages/Swap/SwapBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { useMemo } from 'react'
import { useLocation } from 'react-router-dom'
import { NetworkPluginID } from '@masknet/shared-base'
import { useChainContext, useFungibleToken } from '@masknet/web3-hooks-base'
import type { FungibleToken } from '@masknet/web3-shared-base'
import { createERC20Token, type ChainId, type SchemaType } from '@masknet/web3-shared-evm'
import { createERC20Token } from '@masknet/web3-shared-evm'
import { Trader } from '@masknet/plugin-trader'

export function SwapBox() {
Expand All @@ -26,10 +25,5 @@ export function SwapBox() {
}, [chainId, address, name, symbol, decimals])
const { data: coin } = useFungibleToken(NetworkPluginID.PLUGIN_EVM, address ?? '', fallbackToken, { chainId })

return (
<Trader
defaultInputCoin={coin as FungibleToken<ChainId, SchemaType.Native | SchemaType.ERC20>}
chainId={chainId}
/>
)
return <Trader defaultInputCoin={coin} chainId={chainId} />
}
1 change: 1 addition & 0 deletions packages/shared/src/UI/modals/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const Modals = memo(function Modals(props: ModalProps) {
export const SwapPageModals = memo(function SwapPageModals() {
return (
<>
<ConnectWalletModal ref={modals.ConnectWalletModal.register} />
<SelectProviderModal createWallet={noop} ref={modals.SelectProviderModal.register} />
<WalletRiskWarningModal ref={modals.WalletRiskWarningModal.register} />
<SelectFungibleTokenModal ref={modals.SelectFungibleTokenModal.register} />
Expand Down

0 comments on commit 9f16d65

Please sign in to comment.