Skip to content

Commit

Permalink
fix: mf-5089 failed to get protocol balance for savings (#10501)
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleBill committed Aug 20, 2023
1 parent b7de10b commit e8947ec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/plugins/Savings/src/SiteAdaptor/SavingsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { DialogActions, DialogContent, Tab } from '@mui/material'
import { TabContext, TabPanel } from '@mui/lab'
import {
Web3ContextProvider,
useChainContext,
useFungibleTokens,
RevokeChainContextProvider,
useNetworkContext,
Expand Down Expand Up @@ -67,7 +66,6 @@ export function SavingsDialog({ open, onClose }: SavingsDialogProps) {
const { classes } = useStyles()
const { pluginID } = useNetworkContext()

const { chainId: currentChainId } = useChainContext<NetworkPluginID.PLUGIN_EVM>()
const [chainId, setChainId] = useState(ChainId.Mainnet)
const [selectedProtocol, setSelectedProtocol] = useState<SavingsProtocol | null>(null)
const { data: aaveTokens, isLoading: loadingAAve } = useQuery({
Expand Down Expand Up @@ -119,9 +117,9 @@ export function SavingsDialog({ open, onClose }: SavingsDialogProps) {
const [currentTab, onChange, tabs] = useTabs(TabType.Deposit, TabType.Withdraw)

return (
<Web3ContextProvider value={{ pluginID, chainId: currentChainId }}>
<Web3ContextProvider value={{ pluginID, chainId }}>
<AllProviderTradeContext.Provider>
<ChainContextProvider value={{ chainId: currentChainId }}>
<ChainContextProvider value={{ chainId }}>
<TabContext value={currentTab}>
<InjectedDialog
open={open}
Expand Down

0 comments on commit e8947ec

Please sign in to comment.