Skip to content

Commit

Permalink
feat(simple buy): better add card err msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip London committed Apr 29, 2020
1 parent 14e3cb3 commit 6aec76f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,7 @@ type MessagesType = {
'modals.simplebuy.cancelorder.goback': 'No. Go Back'
'modals.simplebuy.cancelorder.outcome': 'Cancelling this {pair} Buy will remove your order. You can always create a new order from the menu if you cancel now.'
'modals.simplebuy.card_number': 'Card Number'
'modals.simplebuy.card_pending_after_poll': 'We waited one minute and did not receive an update from our card provider. Your card may still be approved later. Please contact support if you have any questions.'
'modals.simplebuy.cc_info_received': 'Waiting for information from your bank...'
'modals.simplebuy.change_billing_address': 'Change Billing Address'
'modals.simplebuy.checkingeligiblity': 'Checking Eligibility...'
Expand All @@ -1045,6 +1046,7 @@ type MessagesType = {
'modals.simplebuy.fiataccountineligible': 'your region.'
'modals.simplebuy.fiatregion': 'your region'
'modals.simplebuy.gatheringinfo': 'Gathering Some Info...'
'modals.simplebuy.link_card_failed': 'Card failed to link. Please try again or contact support if you believe this occured in error.'
'modals.simplebuy.linking_card': 'Securely Linking Your Card'
'modals.simplebuy.linking_card.time': 'This could take up to 1 minute. Please do not close this window.'
'modals.simplebuy.localcurrency': 'Select the local currency for your wallet.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,10 @@ export default ({
let error
switch (state) {
case 'PENDING':
error =
'We waited one minute and did not receive an update from our card provider. Your card may still be approved later. Please contact support if you have any questions.'
error = 'PENDING_CARD_AFTER_POLL'
break
default:
error = `Card state is: ${state}. Please try again or contact support if you believe this occured in error.`
error = `LINK_CARD_FAILED`
}

yield put(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,18 @@ const Success: React.FC<InjectedFormProps<{}, Props> & Props> = props => {
color='red600'
style={{ marginRight: '4px' }}
/>
Error: {props.error}
{props.error === 'PENDING_CARD_AFTER_POLL' && (
<FormattedMessage
id='modals.simplebuy.card_pending_after_poll'
defaultMessage='We waited one minute and did not receive an update from our card provider. Your card may still be approved later. Please contact support if you have any questions.'
/>
)}
{props.error === 'LINK_CARD_FAILED' && (
<FormattedMessage
id='modals.simplebuy.link_card_failed'
defaultMessage='Card failed to link. Please try again or contact support if you believe this occured in error.'
/>
)}
</ErrorCartridge>
</FormGroup>
)}
Expand Down

0 comments on commit 6aec76f

Please sign in to comment.