Skip to content

Commit

Permalink
refactor: close redeem modal (#1367)
Browse files Browse the repository at this point in the history
* refactor: close redeem modal

* fix: correct user messaging copy

* fix: remove unnecessary translation

* fix: correct copy
  • Loading branch information
tomjeatt authored Jun 28, 2023
1 parent 349df79 commit 9281aa2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/assets/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@
"with_added": "(≈ {{amountPrice}}) with added",
"as_compensation_instead": "(≈ {{compensationPrice}}) as compensation instead.",
"view_progress": "View Progress",
"close": "Close",
"btc_destination_address": "BTC destination address",
"you_will_receive": "Redeem {{wrappedTokenSymbol}} 1:1 for BTC",
"waiting_for": "Waiting for",
"vault": "Vault",
"typically_takes": "This typically takes only a few minutes but may sometimes take up to 6 hours.",
"typically_takes": "The BTC typically takes only a few minutes to arrive but may take up to 6 hours.",
"from_vault": "from Vault",
"we_will_inform_you_btc": "We will inform you when the BTC payment is executed.",
"redeem_processed": "Your Redeem request is being processed",
"retried": "Retried",
"error_more_than_6_blocks_behind": "You can't redeem {{wrappedTokenSymbol}} at the moment because {{wrappedTokenSymbol}} parachain is more than 6 blocks behind.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@ import { Modal, ModalBody } from '@/component-library';
import AddressWithCopyUI from '@/legacy-components/AddressWithCopyUI';
import InterlayDefaultContainedButton from '@/legacy-components/buttons/InterlayDefaultContainedButton';
import { Props as ModalProps } from '@/legacy-components/UI/InterlayModal';
import InterlayRouterLink from '@/legacy-components/UI/InterlayRouterLink';
import { ForeignAssetIdLiteral } from '@/types/currency';
import { PAGES, QUERY_PARAMETERS } from '@/utils/constants/links';
import { KUSAMA, POLKADOT } from '@/utils/constants/relay-chain-names';
import { getColorShade } from '@/utils/helpers/colors';
import { getTokenPrice } from '@/utils/helpers/prices';
import { useGetPrices } from '@/utils/hooks/api/use-get-prices';

const queryString = require('query-string');

const USER_BTC_ADDRESS = 'user-btc-address';

interface CustomProps {
Expand Down Expand Up @@ -82,7 +78,6 @@ const LegacyRedeemModal = ({ open, onClose, request }: CustomProps & Omit<ModalP
<AddressWithCopyUI id={USER_BTC_ADDRESS} address={request.userBTCAddress} />
</div>
<div>
<p>{t('redeem_page.we_will_inform_you_btc')}</p>
<p
className={clsx(
{ 'text-interlayTextSecondaryInLightMode': process.env.REACT_APP_RELAY_CHAIN_NAME === POLKADOT },
Expand All @@ -93,18 +88,9 @@ const LegacyRedeemModal = ({ open, onClose, request }: CustomProps & Omit<ModalP
</p>
</div>
</div>
<InterlayRouterLink
to={{
pathname: PAGES.BRIDGE,
search: queryString.stringify({
[QUERY_PARAMETERS.REDEEM_REQUEST_ID]: request.id
})
}}
>
<InterlayDefaultContainedButton onClick={onClose} className='w-full'>
{t('redeem_page.view_progress')}
</InterlayDefaultContainedButton>
</InterlayRouterLink>
<InterlayDefaultContainedButton onClick={onClose} className='w-full'>
{t('redeem_page.close')}
</InterlayDefaultContainedButton>
</div>
</ModalBody>
</Modal>
Expand Down

2 comments on commit 9281aa2

@vercel
Copy link

@vercel vercel bot commented on 9281aa2 Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 9281aa2 Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.