diff --git a/src/app/containers/LiquidityRemoveContainer/index.tsx b/src/app/containers/LiquidityRemoveContainer/index.tsx index a0b086907..787077caf 100644 --- a/src/app/containers/LiquidityRemoveContainer/index.tsx +++ b/src/app/containers/LiquidityRemoveContainer/index.tsx @@ -24,12 +24,12 @@ import { FieldGroup } from '../../components/FieldGroup'; import { AmountField } from '../AmountField'; import { TradeButton } from '../../components/TradeButton'; import { useApproveAndRemoveLiquidity } from '../../hooks/amm/useApproveAndRemoveLiquidity'; -import { useCanInteract } from 'app/hooks/useCanInteract'; +import { useIsConnected } from '../../hooks/useAccount'; interface Props {} export function LiquidityRemoveContainer(props: Props) { - const isConnected = useCanInteract(); + const isConnected = useIsConnected(); const tokens = liquidityPools.map(item => ({ key: item.source, label: `${item.tokenLabel} - Pool token`, diff --git a/src/app/containers/RepayPositionHandler/RepayPositionForm.tsx b/src/app/containers/RepayPositionHandler/RepayPositionForm.tsx index 2ff78e285..cd20ec78b 100644 --- a/src/app/containers/RepayPositionHandler/RepayPositionForm.tsx +++ b/src/app/containers/RepayPositionHandler/RepayPositionForm.tsx @@ -6,7 +6,7 @@ import React, { useCallback, useState } from 'react'; import { min, bignumber } from 'mathjs'; -import { useAccount } from '../../hooks/useAccount'; +import { useAccount, useIsConnected } from '../../hooks/useAccount'; import { useIsAmountWithinLimits } from '../../hooks/useIsAmountWithinLimits'; import { ActiveLoan } from '../../hooks/trading/useGetLoan'; import { useWeiAmount } from '../../hooks/useWeiAmount'; @@ -20,14 +20,13 @@ import { useAssetBalanceOf } from '../../hooks/useAssetBalanceOf'; import { weiTo18, weiTo4 } from '../../../utils/blockchain/math-helpers'; import { DummyField } from '../../components/DummyField'; import { useApproveAndCloseWithDeposit } from '../../hooks/trading/useApproveAndCloseWithDeposit'; -import { useCanInteract } from '../../hooks/useCanInteract'; interface Props { loan: ActiveLoan; } export function RepayPositionForm({ loan }: Props) { - const canInteract = useCanInteract(); + const canInteract = useIsConnected(); const { asset } = AssetsDictionary.getByTokenContractAddress(loan.loanToken); const { value: balance } = useAssetBalanceOf(asset);