Skip to content

Commit

Permalink
feat(simple buy): handle diff transfer details
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip London committed Mar 27, 2020
1 parent 51a0989 commit 287af85
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { selectors } from 'data'
import Currencies, {
FiatCurrenciesType
} from 'blockchain-wallet-v4/src/exchange/currencies'
import React, { SyntheticEvent, useState } from 'react'
import React, { useState } from 'react'
import styled from 'styled-components'

type OwnProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,62 @@ const Success: React.FC<Props> = props => {
</Text>
</InfoContainer>
</FlyoutWrapper>
<Row>
<Title>
<FormattedMessage
id='modals.simplebuy.transferdetails.bankname'
defaultMessage='Bank Name'
/>
</Title>
<Value>{props.account.agent.name}</Value>
</Row>
<Row>
<Title>
<FormattedMessage
id='modals.simplebuy.transferdetails.bankid'
defaultMessage='Bank ID'
/>
</Title>
<Value>{props.account.agent.account}</Value>
</Row>
{(props.account.currency === 'USD' ||
props.account.currency === 'EUR') && (
<Row>
<Title>
<FormattedMessage
id='modals.simplebuy.transferdetails.bankname'
defaultMessage='Bank Name'
/>
</Title>
<Value>{props.account.agent.name}</Value>
</Row>
)}
{props.account.currency === 'EUR' && (
<Row>
<Title>
<FormattedMessage
id='modals.simplebuy.transferdetails.bankid'
defaultMessage='Bank ID'
/>
</Title>
<Value>{props.account.agent.account}</Value>
</Row>
)}
{props.account.currency === 'GBP' && (
<Row>
<Title>
<FormattedMessage
id='modals.simplebuy.transferdetails.account'
defaultMessage='Account Number'
/>
</Title>
<Value>{props.account.agent.account}</Value>
</Row>
)}
{props.account.currency === 'GBP' && (
<Row>
<Title>
<FormattedMessage
id='modals.simplebuy.transferdetails.sortcode'
defaultMessage='Sort Code'
/>
</Title>
<Value>{props.account.agent.code}</Value>
</Row>
)}
{props.account.currency === 'EUR' && (
<Row>
<Title>
<FormattedMessage
id='modals.simplebuy.transferdetails.swift'
defaultMessage='Bank Code (SWIFT / BIC)'
/>
</Title>
<Value>{props.account.agent.code}</Value>
</Row>
)}
{props.account.currency === 'USD' && (
<Row>
<Title size='14px' weight={500} color='grey600'>
Expand All @@ -107,18 +145,15 @@ const Success: React.FC<Props> = props => {
<Value>{props.account.agent.routingNumber}</Value>
</Row>
)}
{(props.account.currency === 'USD' ||
props.account.currency === 'GBP') && (
<Row>
<Title>
<FormattedMessage
id='modals.simplebuy.transferdetails.recipient'
defaultMessage='Recipient'
/>
</Title>
<Value>{props.account.agent.recipient}</Value>
</Row>
)}
<Row>
<Title>
<FormattedMessage
id='modals.simplebuy.transferdetails.recipient'
defaultMessage='Recipient'
/>
</Title>
<Value>{props.account.agent.recipient}</Value>
</Row>
<Row>
<Title>
<FormattedMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export type SBAccountType =
account: string
code: string
name: string
recipient: string
}
currency: 'EUR'
}
Expand Down

0 comments on commit 287af85

Please sign in to comment.