Skip to content

Commit

Permalink
Merge pull request #285 from reflexer-labs/develop
Browse files Browse the repository at this point in the history
fix repay
  • Loading branch information
mstfash authored Dec 9, 2021
2 parents bd7f77d + 9e299f7 commit 9943605
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/containers/OnBoarding/ModifySafe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const ModifySafe = ({
connectWalletModel: connectWalletActions,
popupsModel: popupsActions,
} = useStoreActions((state) => state)

const type = isDeposit ? 'deposit_borrow' : 'repay_withdraw'
const {
error,
balances,
Expand All @@ -40,7 +42,7 @@ const ModifySafe = ({
totalDebt,
collateralRatio,
liquidationPrice,
} = useSafeInfo(isDeposit ? 'deposit_borrow' : 'repay_withdraw')
} = useSafeInfo(type)

const [unlockState, approveUnlock] = useTokenApproval(
parsedAmounts.rightInput,
Expand Down Expand Up @@ -183,7 +185,7 @@ const ModifySafe = ({
handleModalContent
>
<ReviewContainer>
<Review type={'create'} />
<Review type={type} />
<BtnContainer>
<Button id="confirm_tx" onClick={handleConfirm}>
{'Confirm Transaction'}
Expand Down

0 comments on commit 9943605

Please sign in to comment.