Skip to content

Commit

Permalink
adjust it
Browse files Browse the repository at this point in the history
  • Loading branch information
reallybeard committed Sep 29, 2023
1 parent 6d47889 commit bc84be3
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 19 deletions.
4 changes: 3 additions & 1 deletion src/assets/translations/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"all": "All",
"viewAll": "View All",
"slippage": "Slippage",
"feesPlusSlippage": "Fees + Slippage",
"best": "Best",
"gasFee": "Gas Fee",
"fees": "Fees",
Expand Down Expand Up @@ -2123,7 +2124,7 @@
"collateralizationRatio": "Collateralization Ratio",
"totalBorrowers": "Total Borrowers",
"myLoanInformation": "My Loan Information",
"loanInformation": "Loan Information",
"loanInformation": "Loan Summary",
"poolInformation": "Pool Information",
"collateralBalance": "Collateral Balance",
"debtBalance": "Debt Balance",
Expand All @@ -2138,6 +2139,7 @@
"risky": "Risky",
"confirmAndBorrow": "Confirm and Borrow",
"confirmAndRepay": "Confirm and Repay",
"transactionInfo": "Transaction Summary",
"repayNoticeTitle": "Hold Up!",
"repayNoticeCta": "I understand",
"repayNotice": "To get back your collateral you will need to repay 100% of your debt.",
Expand Down
34 changes: 25 additions & 9 deletions src/pages/Lending/Pool/components/Borrow/BorrowConfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import { useTranslate } from 'react-polyglot'
import { useHistory } from 'react-router'
import { usdcAssetId } from 'test/mocks/accounts'
import { Amount } from 'components/Amount/Amount'
import { HelperTooltip } from 'components/HelperTooltip/HelperTooltip'
import { AssetToAsset } from 'components/MultiHopTrade/components/TradeConfirm/AssetToAsset'
import { WithBackButton } from 'components/MultiHopTrade/components/WithBackButton'
import { Row } from 'components/Row/Row'
import { SlideTransition } from 'components/SlideTransition'
import { Text } from 'components/Text'
import { RawText, Text } from 'components/Text'
import { selectAssetById } from 'state/slices/selectors'
import { useAppSelector } from 'state/store'

Expand Down Expand Up @@ -45,27 +46,42 @@ export const BorrowConfirm = () => {
px={6}
mb={4}
/>
<LoanSummary borderTopWidth={0} mt={0} />
<Stack py={4} spacing={4} px={6} fontSize='sm' fontWeight='medium'>
<Row fontSize='sm' fontWeight='medium'>
<Row.Label>{translate('common.slippage')}</Row.Label>
<Row.Value>
<Amount.Crypto value='20' symbol='BTC' />
<RawText fontWeight='bold'>{translate('lending.transactionInfo')}</RawText>
<Row>
<Row.Label>Send</Row.Label>
<Row.Value textAlign='right'>
<Stack spacing={1} flexDir='row' flexWrap='wrap'>
<Amount.Crypto value='1' symbol={collateralAsset?.symbol ?? ''} />
<Amount.Fiat color='text.subtle' value='29850' prefix='≈' />
</Stack>
</Row.Value>
</Row>
<Row>
<Row.Label>Recieve</Row.Label>
<Row.Value textAlign='right'>
<Stack spacing={1} flexDir='row' flexWrap='wrap'>
<Amount.Crypto value='14820' symbol={debtAsset?.symbol ?? ''} />
<Amount.Fiat color='text.subtle' value='14820' prefix='≈' />
</Stack>
</Row.Value>
</Row>
<Row fontSize='sm' fontWeight='medium'>
<Row.Label>{translate('common.gasFee')}</Row.Label>
<HelperTooltip label='tbd'>
<Row.Label>{translate('common.feesPlusSlippage')}</Row.Label>
</HelperTooltip>
<Row.Value>
<Amount.Fiat value='10' />
</Row.Value>
</Row>
<Row fontSize='sm' fontWeight='medium'>
<Row.Label>{translate('common.fees')}</Row.Label>
<Row.Label>{translate('common.gasFee')}</Row.Label>
<Row.Value>
<Amount.Fiat value='0' />
<Amount.Fiat value='10' />
</Row.Value>
</Row>
</Stack>
<LoanSummary borderTopWidth={0} mt={0} />
<CardFooter px={4} py={4}>
<Button colorScheme='blue' size='lg' width='full'>
{translate('lending.confirmAndBorrow')}
Expand Down
34 changes: 25 additions & 9 deletions src/pages/Lending/Pool/components/Repay/RepayConfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import { useTranslate } from 'react-polyglot'
import { useHistory } from 'react-router'
import { usdcAssetId } from 'test/mocks/accounts'
import { Amount } from 'components/Amount/Amount'
import { HelperTooltip } from 'components/HelperTooltip/HelperTooltip'
import { AssetToAsset } from 'components/MultiHopTrade/components/TradeConfirm/AssetToAsset'
import { WithBackButton } from 'components/MultiHopTrade/components/WithBackButton'
import { Row } from 'components/Row/Row'
import { SlideTransition } from 'components/SlideTransition'
import { Text } from 'components/Text'
import { RawText, Text } from 'components/Text'
import { selectAssetById } from 'state/slices/selectors'
import { useAppSelector } from 'state/store'

Expand Down Expand Up @@ -45,27 +46,42 @@ export const RepayConfirm = () => {
px={6}
mb={4}
/>
<LoanSummary borderTopWidth={0} mt={0} />
<Stack py={4} spacing={4} px={6} fontSize='sm' fontWeight='medium'>
<Row fontSize='sm' fontWeight='medium'>
<Row.Label>{translate('common.slippage')}</Row.Label>
<Row.Value>
<Amount.Crypto value='20' symbol='BTC' />
<RawText fontWeight='bold'>{translate('lending.transactionInfo')}</RawText>
<Row>
<Row.Label>Send</Row.Label>
<Row.Value textAlign='right'>
<Stack spacing={1} flexDir='row' flexWrap='wrap'>
<Amount.Crypto value='1' symbol={collateralAsset?.symbol ?? ''} />
<Amount.Fiat color='text.subtle' value='29850' prefix='≈' />
</Stack>
</Row.Value>
</Row>
<Row>
<Row.Label>Recieve</Row.Label>
<Row.Value textAlign='right'>
<Stack spacing={1} flexDir='row' flexWrap='wrap'>
<Amount.Crypto value='14820' symbol={debtAsset?.symbol ?? ''} />
<Amount.Fiat color='text.subtle' value='14820' prefix='≈' />
</Stack>
</Row.Value>
</Row>
<Row fontSize='sm' fontWeight='medium'>
<Row.Label>{translate('common.gasFee')}</Row.Label>
<HelperTooltip label='tbd'>
<Row.Label>{translate('common.feesPlusSlippage')}</Row.Label>
</HelperTooltip>
<Row.Value>
<Amount.Fiat value='10' />
</Row.Value>
</Row>
<Row fontSize='sm' fontWeight='medium'>
<Row.Label>{translate('common.fees')}</Row.Label>
<Row.Label>{translate('common.gasFee')}</Row.Label>
<Row.Value>
<Amount.Fiat value='0' />
<Amount.Fiat value='10' />
</Row.Value>
</Row>
</Stack>
<LoanSummary borderTopWidth={0} mt={0} />
<CardFooter px={4} py={4}>
<Button colorScheme='blue' size='lg' width='full'>
{translate('lending.confirmAndBorrow')}
Expand Down

0 comments on commit bc84be3

Please sign in to comment.