Skip to content

Commit

Permalink
feat(usd deposit): use props.account.currency rather then fiatCurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
milan-bc committed Sep 10, 2020
1 parent 938f7dc commit 578eb7e
Showing 1 changed file with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const Success: React.FC<Props> = props => {
onClick={() =>
props.simpleBuyActions.setStep({
step: 'PAYMENT_METHODS',
fiatCurrency: props.fiatCurrency || 'USD',
fiatCurrency: props.account.currency || 'USD',
pair: props.pair,
cryptoCurrency: props.cryptoCurrency || 'BTC',
order: props.order
Expand All @@ -115,15 +115,15 @@ const Success: React.FC<Props> = props => {
<Icon
size='32px'
color='fiat'
name={props.fiatCurrency.toLowerCase() as keyof IcoMoonType}
name={props.account.currency.toLowerCase() as keyof IcoMoonType}
/>
<InfoContainer>
<TopText color='grey800' size='24px' weight={600}>
<FormattedMessage
id='modals.simplebuy.deposit.title'
defaultMessage='Deposit {currency}'
values={{
currency: Currencies[props.fiatCurrency].displayName
currency: Currencies[props.account.currency].displayName
}}
/>
{!props.displayBack && (
Expand All @@ -144,7 +144,7 @@ const Success: React.FC<Props> = props => {
</TopText>
</InfoContainer>
</FlyoutWrapper>
{props.fiatCurrency === 'USD' && (
{props.account.currency === 'USD' && (
<RowCopy>
<div>
<Title>
Expand All @@ -160,7 +160,8 @@ const Success: React.FC<Props> = props => {
</Copy>
</RowCopy>
)}
{(props.fiatCurrency === 'USD' || props.fiatCurrency === 'EUR') && (
{(props.account.currency === 'USD' ||
props.account.currency === 'EUR') && (
<Row>
<Title>
<FormattedMessage
Expand All @@ -171,7 +172,7 @@ const Success: React.FC<Props> = props => {
<Value data-e2e='sbBankName'>{props.account.agent.name}</Value>
</Row>
)}
{props.fiatCurrency === 'EUR' && (
{props.account.currency === 'EUR' && (
<RowCopy>
<div>
<Title>
Expand All @@ -187,7 +188,8 @@ const Success: React.FC<Props> = props => {
</Copy>
</RowCopy>
)}
{(props.fiatCurrency === 'USD' || props.fiatCurrency === 'GBP') &&
{(props.account.currency === 'USD' ||
props.account.currency === 'GBP') &&
!!props.account.agent.account && (
<RowCopy>
<div>
Expand All @@ -206,7 +208,7 @@ const Success: React.FC<Props> = props => {
</Copy>
</RowCopy>
)}
{props.fiatCurrency === 'GBP' && (
{props.account.currency === 'GBP' && (
<RowCopy>
<div>
<Title>
Expand All @@ -222,7 +224,7 @@ const Success: React.FC<Props> = props => {
</Copy>
</RowCopy>
)}
{props.fiatCurrency === 'EUR' && (
{props.account.currency === 'EUR' && (
<RowCopy>
<div>
<Title>
Expand All @@ -238,7 +240,7 @@ const Success: React.FC<Props> = props => {
</Copy>
</RowCopy>
)}
{props.fiatCurrency === 'USD' && (
{props.account.currency === 'USD' && (
<RowCopy>
<div>
<Title>
Expand Down Expand Up @@ -321,19 +323,19 @@ const Success: React.FC<Props> = props => {
/>
</DisplayTitle>
<DisplaySubTitle>
{props.fiatCurrency === 'GBP' && (
{props.account.currency === 'GBP' && (
<FormattedMessage
id='modals.simplebuy.deposit.processing_time.info.gbp'
defaultMessage='Funds will be credited to your GBP wallet as soon as we receive them. In the UK Faster Payments Network, this can take a couple of hours.'
/>
)}
{props.fiatCurrency === 'EUR' && (
{props.account.currency === 'EUR' && (
<FormattedMessage
id='modals.simplebuy.deposit.processing_time.info.eur'
defaultMessage='Funds will be credited to your EUR wallet as soon as we receive them. SEPA transfers usually take around 1 business day to reach us.'
/>
)}
{props.fiatCurrency === 'USD' && (
{props.account.currency === 'USD' && (
<FormattedMessage
id='modals.simplebuy.deposit.processing_time.info.usd'
defaultMessage='Funds will be credited to your USD wallet as soon as we receive them. Funds are generally available within one business day.'
Expand All @@ -343,7 +345,7 @@ const Success: React.FC<Props> = props => {
</BottomMultiRowContainer>
</BottomRow>

{props.fiatCurrency === 'GBP' && (
{props.account.currency === 'GBP' && (
<LegalWrapper inline>
<Text size='12px' weight={500} color='grey600'>
<FormattedMessage
Expand Down

0 comments on commit 578eb7e

Please sign in to comment.