Skip to content

Commit

Permalink
feat: fees repay notice
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre committed Nov 22, 2023
1 parent 4b1fe00 commit df4294f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/assets/translations/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -2220,6 +2220,7 @@
"repayNoticeTitle": "Hold Up!",
"repayNoticeCta": "I understand",
"repayNotice": "To get back your collateral you will need to repay 100% of your debt.",
"feesNotice": "Fees occurred on the collateral you will receive back after repaying 100% of your debt",
"faq": {
"title": "FAQ",
"lending": {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Lending/Pool/components/Repay/RepayConfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ export const RepayConfirm = ({
</Skeleton>
<Skeleton isLoaded={isLendingQuoteCloseSuccess}>
<Row fontSize='sm' fontWeight='medium'>
<HelperTooltip label='tbd'>
<HelperTooltip label={translate('lending.feesNotice')}>
<Row.Label>{translate('common.feesPlusSlippage')}</Row.Label>
</HelperTooltip>
<Row.Value>
Expand Down
17 changes: 10 additions & 7 deletions src/pages/Lending/Pool/components/Repay/RepayInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'
import { useTranslate } from 'react-polyglot'
import { useHistory } from 'react-router'
import { Amount } from 'components/Amount/Amount'
import { HelperTooltip } from 'components/HelperTooltip/HelperTooltip'
import { TradeAssetSelect } from 'components/MultiHopTrade/components/AssetSelection'
import { TradeAssetInput } from 'components/MultiHopTrade/components/TradeAssetInput'
import { Row } from 'components/Row/Row'
Expand Down Expand Up @@ -388,14 +389,16 @@ export const RepayInput = ({
</Skeleton>
</Row.Value>
</Row>
{bnOrZero(lendingQuoteCloseData?.quoteTotalFeesFiatUserCurrency).gt(0) && (
<Row fontSize='sm' fontWeight='medium'>
<Row fontSize='sm' fontWeight='medium'>
<HelperTooltip label={translate('lending.feesNotice')}>
<Row.Label>{translate('common.fees')}</Row.Label>
<Row.Value>
<Amount.Fiat value={lendingQuoteCloseData!.quoteTotalFeesFiatUserCurrency} />
</Row.Value>
</Row>
)}
</HelperTooltip>
<Row.Value>
<Skeleton isLoaded={isLendingQuoteCloseSuccess}>
<Amount.Fiat value={lendingQuoteCloseData?.quoteTotalFeesFiatUserCurrency ?? 0} />
</Skeleton>
</Row.Value>
</Row>
<Button
size='lg'
colorScheme={
Expand Down

0 comments on commit df4294f

Please sign in to comment.