Skip to content

Commit

Permalink
Merge pull request #1479 from blockchain/fix/personal-details
Browse files Browse the repository at this point in the history
fix(Personal): Remove Region from required fields
  • Loading branch information
schnogz committed Feb 26, 2019
2 parents ebfbe97 + 84a150e commit 3dc4dcd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,6 @@ describe('IdentityVerification Modal', () => {
.simulate('change', {
target: { value: 'Paris' }
})
wrapper
.find('Field[name="state"]')
.find('input[name="state"]')
.simulate('change', {
target: { value: POSSIBLE_ADDRESSES[0]['state'] }
})
await jest.runAllTimers()
await flushPromises()
wrapper.update()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,73 +436,29 @@ const Personal = ({
/>
</FormItem>
</FaqFormGroup>
{!countryIsUS && (
<FaqFormGroup>
<PersonalItem>
<PersonalField>
<Label htmlFor='state'>
<FormattedMessage
id='identityverification.personal.region'
defaultMessage='Region'
/>
</Label>
<Field
name='state'
errorBottom
validate={required}
countryCode={countryCode}
component={TextBox}
<FaqFormGroup>
<FormItem>
<Label htmlFor='postCode'>
{countryUsesZipcode(countryCode) ? (
<FormattedMessage
id='identityverification.personal.zipcode'
defaultMessage='Zip Code'
/>
</PersonalField>
<PersonalField>
<Label htmlFor='postCode'>
{countryUsesZipcode(countryCode) ? (
<FormattedMessage
id='identityverification.personal.zipcode'
defaultMessage='Zip Code'
/>
) : (
<FormattedMessage
id='identityverification.personal.postcode'
defaultMessage='Postcode'
/>
)}
</Label>
<Field
name='postCode'
errorBottom
validate={requiredZipCode}
component={TextBox}
) : (
<FormattedMessage
id='identityverification.personal.postcode'
defaultMessage='Postcode'
/>
</PersonalField>
</PersonalItem>
</FaqFormGroup>
)}
{countryIsUS && (
<FaqFormGroup>
<FormItem>
<Label htmlFor='postCode'>
{countryUsesZipcode(countryCode) ? (
<FormattedMessage
id='identityverification.personal.zipcode'
defaultMessage='Zip Code'
/>
) : (
<FormattedMessage
id='identityverification.personal.postcode'
defaultMessage='Postcode'
/>
)}
</Label>
<Field
name='postCode'
errorBottom
validate={requiredZipCode}
component={TextBox}
/>
</FormItem>
</FaqFormGroup>
)}
)}
</Label>
<Field
name='postCode'
errorBottom
validate={requiredZipCode}
component={TextBox}
/>
</FormItem>
</FaqFormGroup>
</AddressWrapper>
)}
</FormContainer>
Expand Down

0 comments on commit 3dc4dcd

Please sign in to comment.