Skip to content

Commit

Permalink
feat(sell): fixed disclaimer error
Browse files Browse the repository at this point in the history
  • Loading branch information
milan-bc committed Jun 8, 2021
1 parent 7d40957 commit cb34481
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 45 deletions.
Expand Up @@ -1441,7 +1441,7 @@ type MessagesType = {
'modals.simplebuy.comfirm.price': '{baseCoinTicker} Price'
'modals.simplebuy.confirm.rate': 'Exchange Rate'
'modals.simplebuy.confirm.coin_price': '{coin} Price'
'modals.simplebuy.confirm.sell_description': "Final amount may change due to market activity.<br /> By approving this Sell you agree to Blockchain.com’s <br /><a href='https://www.blockchain.com/legal/terms' rel='noopener noreferrer' target='_blank'>Refund Policy.</a>"
'modals.simplebuy.confirm.sell_description': "Final amount may change due to market activity.<br /> By approving this Sell you agree to Blockchain.com’s <br /><a>Refund Policy.</a>"
'modals.simplebuy.confirm.coin_tooltip': 'Blockchain.com provides the best market price we receive and applies a spread.'
'modals.simplebuy.confirm.sale_amount': 'Sale Amount'
'modals.simplebuy.confirm.network_fees': 'Network fees are set by the {coin} network.'
Expand Down
Expand Up @@ -6,13 +6,7 @@ import { Button, Icon, Image, Link, Text } from 'blockchain-info-components'
import { DisplayPaymentIcon } from 'components/SimpleBuy'

import { Props } from '.'
import {
ButtonWrapper,
ItemIcon,
ListWrapper,
MainWrapper,
TitleWrapper
} from './styles'
import { ButtonWrapper, ItemIcon, ListWrapper, MainWrapper, TitleWrapper } from './styles'

const shouldRenderInfo = (tier: number) => {
switch (tier) {
Expand All @@ -25,7 +19,7 @@ const shouldRenderInfo = (tier: number) => {
}
}

const getStatus = tier => {
const getStatus = (tier) => {
switch (tier) {
case 1:
return 'Silver Verified'
Expand All @@ -52,7 +46,7 @@ const InfoText = styled(Text)`
display: flex;
text-align: left;
a {
color: ${props => props.theme.blue600};
color: ${(props) => props.theme.blue600};
text-decoration: none;
}
`
Expand All @@ -74,7 +68,7 @@ const ListText = styled(Text)`
}
`

const Success: React.FC<Props & { close: () => void; data: any }> = props => {
const Success: React.FC<Props & { close: () => void; data: any }> = (props) => {
const { close, userTiers } = props

// @ts-ignore
Expand All @@ -88,12 +82,7 @@ const Success: React.FC<Props & { close: () => void; data: any }> = props => {
</DisplayPaymentIcon>
</IconWrapper>
<TitleWrapper>
<Text
color='grey900'
size='24px'
weight={600}
style={{ justifyContent: 'flex-start' }}
>
<Text color='grey900' size='24px' weight={600} style={{ justifyContent: 'flex-start' }}>
<FormattedMessage
id='modals.onboarding.linkfromexchange.successheader'
defaultMessage='Your Accounts are Connected!'
Expand All @@ -112,7 +101,7 @@ const Success: React.FC<Props & { close: () => void; data: any }> = props => {
color='grey600'
size='16px'
weight={500}
style={{ textAlign: 'left', marginLeft: '18px' }}
style={{ marginLeft: '18px', textAlign: 'left' }}
>
<FormattedMessage
id='modals.onboarding.linkfromexchange.success_info1'
Expand All @@ -134,7 +123,7 @@ const Success: React.FC<Props & { close: () => void; data: any }> = props => {
color='grey600'
size='16px'
weight={500}
style={{ textAlign: 'left', marginLeft: '18px' }}
style={{ marginLeft: '18px', textAlign: 'left' }}
>
<FormattedMessage
id='modals.onboarding.linkfromexchange.success_info2'
Expand All @@ -147,12 +136,7 @@ const Success: React.FC<Props & { close: () => void; data: any }> = props => {
</InfoWrapper>
)}

<InfoText
color='grey900'
size='16px'
weight={600}
style={{ marginTop: '8px' }}
>
<InfoText color='grey900' size='16px' weight={600} style={{ marginTop: '8px' }}>
<FormattedMessage
id='modals.onboarding.linkfromexchange.success_remember_title'
defaultMessage='Remember!'
Expand Down Expand Up @@ -180,7 +164,7 @@ const Success: React.FC<Props & { close: () => void; data: any }> = props => {
color='grey900'
size='16px'
weight={600}
style={{ textAlign: 'left', marginLeft: '18px' }}
style={{ marginLeft: '18px', textAlign: 'left' }}
>
<FormattedMessage
id='modals.onboarding.linkfromexchange.success_subinfo1_title'
Expand All @@ -202,7 +186,7 @@ const Success: React.FC<Props & { close: () => void; data: any }> = props => {
color='grey600'
size='16px'
weight={500}
style={{ textAlign: 'left', marginLeft: '18px' }}
style={{ marginLeft: '18px', textAlign: 'left' }}
>
<FormattedMessage
id='modals.onboarding.linkfromexchange.success_subinfo1_description2'
Expand All @@ -221,7 +205,7 @@ const Success: React.FC<Props & { close: () => void; data: any }> = props => {
color='grey900'
size='16px'
weight={600}
style={{ textAlign: 'left', marginLeft: '18px' }}
style={{ marginLeft: '18px', textAlign: 'left' }}
>
<FormattedMessage
id='modals.onboarding.linkfromexchange.success_subinfo2_title'
Expand All @@ -246,17 +230,20 @@ const Success: React.FC<Props & { close: () => void; data: any }> = props => {
</ListWrapper>
</InfoWrapper>

<InfoText
color='grey600'
size='16px'
weight={500}
style={{ marginBottom: '24px' }}
>
<InfoText color='grey600' size='16px' weight={500} style={{ marginBottom: '24px' }}>
<FormattedMessage
id='modals.onboarding.linkfromexchange.success_disclaimer'
defaultMessage="Having different Exchange and Wallet passwords helps to keep your accounts safe! <a>Learn more</a> about the Wallet."
values= {{
a: msg => <a href='https://support.blockchain.com/hc/en-us/articles/360029029911-Your-Wallet-101' rel='noopener noreferrer' target='_blank'>{msg}</a>
defaultMessage='Having different Exchange and Wallet passwords helps to keep your accounts safe! <a>Learn more</a> about the Wallet.'
values={{
a: (msg) => (
<a
href='https://support.blockchain.com/hc/en-us/articles/360029029911-Your-Wallet-101'
rel='noopener noreferrer'
target='_blank'
>
{msg}
</a>
)
}}
/>
</InfoText>
Expand All @@ -283,13 +270,7 @@ const Success: React.FC<Props & { close: () => void; data: any }> = props => {
rel='noopener noreferrer'
href='https://exchange.blockchain.com/trade'
>
<Button
nature='primary'
height='56px'
fullwidth
onClick={close}
data-e2e='linkDone'
>
<Button nature='primary' height='56px' fullwidth onClick={close} data-e2e='linkDone'>
<Text color='white' size='16px' weight={500}>
<FormattedMessage
id='modals.onboarding.linkfromexchange.back_to_exchange'
Expand Down
Expand Up @@ -513,7 +513,18 @@ class PreviewSell extends PureComponent<
<DisclaimerText>
<FormattedMessage
id='modals.simplebuy.confirm.sell_description'
defaultMessage="Final amount may change due to market activity.<br /> By approving this Sell you agree to Blockchain.com’s <br /><a href='https://www.blockchain.com/legal/terms' rel='noopener noreferrer' target='_blank'>Refund Policy.</a>"
defaultMessage='Final amount may change due to market activity.<br /> By approving this Sell you agree to Blockchain.com’s <br /><a>Refund Policy.</a>'
values={{
a: (msg: string) => (
<a
href='https://www.blockchain.com/legal/terms'
rel='noopener noreferrer'
target='_blank'
>
{msg}
</a>
)
}}
/>
</DisclaimerText>
</FlyoutWrapper>
Expand Down

0 comments on commit cb34481

Please sign in to comment.