Skip to content

Commit

Permalink
allow non-whitelisted users to withdraw their liquidity and repay loans
Browse files Browse the repository at this point in the history
  • Loading branch information
creed-victor committed Nov 20, 2020
1 parent ae67c61 commit 48ff95d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app/containers/LiquidityRemoveContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down
5 changes: 2 additions & 3 deletions src/app/containers/RepayPositionHandler/RepayPositionForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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);
Expand Down

0 comments on commit 48ff95d

Please sign in to comment.