Skip to content

Commit

Permalink
Merge branch 'development' into fix/various-bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
schnogz committed May 2, 2019
2 parents e862169 + 12523cf commit 962c91f
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const CreatableInputField = props => {
const errorState = touched && invalid ? 'invalid' : 'initial'

return (
<Container maxWidth={props.maxWidth}>
<Container maxWidth={props.maxWidth} data-e2e={props.dataE2e}>
<CreatableInput {...input} {...meta} {...rest} errorState={errorState} />
{(touched || !pristine) && error && !hideErrors && (
<Error errorBottom={errorBottom}>{error}</Error>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ const FirstStep = props => {
name='to'
placeholder='Paste, scan, or select destination'
component={SelectBoxBchAddresses}
dataE2e='sendBchAddressInput'
validate={[required, validBchAddress]}
exclude={[from.label]}
openMenuOnClick={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ const FirstStep = props => {
name='to'
placeholder='Paste, scan, or select destination'
component={SelectBoxBtcAddresses}
dataE2e='sendBtcAddressInput'
validate={[required, validBtcAddress]}
exclude={[from.label]}
openMenuOnClick={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const FirstStep = props => {
placeholder='Paste, scan, or select destination'
validate={[required, validEthAddress]}
component={SelectBoxEthAddresses}
dataE2e='sendEthAddressInput'
exclude={[from.label]}
openMenuOnClick={false}
includeAll={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const maximumAmount = (value, allValues, props) => {
) ? (
undefined
) : (
<MaximumAmountMessage coin={coin} />
<MaximumAmountMessage coin={props.coin} />
)
} catch (e) {}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ export const InvalidAmountMessage = () => (
/>
)

export const MaximumAmountMessage = coin => (
export const MaximumAmountMessage = props => (
<Wrapper>
<FormattedMessage
id='modals.sendeth.maximumamountmessage'
defaultMessage='Not enough funds. Use'
/>
<MaximumAmountLink coin={coin} />
<MaximumAmountLink coin={props.coin} />
</Wrapper>
)

Expand All @@ -41,22 +41,22 @@ export const InsufficientFundsMessage = () => (
/>
)

export const MaximumFeeMessage = coin => (
export const MaximumFeeMessage = props => (
<Wrapper>
<FormattedMessage
id='modals.sendeth.maximumfeemessage'
defaultMessage='Unnecessarily high fee.'
/>
<span>&nbsp;</span>
<MaximumFeeLink coin={coin} />
<MaximumFeeLink coin={props.coin} />
</Wrapper>
)
export const MinimumFeeMessage = coin => (
export const MinimumFeeMessage = props => (
<Wrapper>
<FormattedMessage
id='modals.sendeth.minimumfeemessage'
defaultMessage='Low fee not recommended. Use'
/>
<MinimumFeeLink coin={coin} />
<MinimumFeeLink coin={props.coin} />
</Wrapper>
)
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ const FirstStep = props => {
name='to'
placeholder='Paste, scan, or select destination'
component={SelectBoxXlmAddresses}
dataE2e='sendXlmAddressInput'
validate={[required, validXlmAddress]}
exclude={[from.label]}
openMenuOnClick={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ export const AgeOverEighteenMessage = () => (
/>
)
export const InvalidBtcAddressMessage = () => (
<FormattedMessage
id='formhelper.invalidbtcaddress'
defaultMessage='Invalid Bitcoin address'
/>
<div data-e2e='invalidBtcAddress'>
<FormattedMessage
id='formhelper.invalidbtcaddress'
defaultMessage='Invalid Bitcoin address'
/>
</div>
)
export const InvalidBchAddressMessage = () => (
<FormattedMessage
id='formhelper.invalidbchaddress'
defaultMessage='Invalid Bitcoin Cash address'
/>
<div data-e2e='invalidBchAddress'>
<FormattedMessage
id='formhelper.invalidbchaddress'
defaultMessage='Invalid Bitcoin Cash address'
/>
</div>
)
export const InvalidBtcPrivateKeyMessage = () => (
<FormattedMessage
Expand Down Expand Up @@ -45,16 +49,20 @@ export const InvalidEmailMessage = () => (
)
export const ValidEmailNotAllowed = () => 'valid_email_not_allowed'
export const InvalidEthAddressMessage = () => (
<FormattedMessage
id='formhelper.invalid_ethereum_address'
defaultMessage='Invalid Ethereum address'
/>
<div data-e2e='invalidEthAddress'>
<FormattedMessage
id='formhelper.invalid_ethereum_address'
defaultMessage='Invalid Ethereum address'
/>
</div>
)
export const InvalidXlmAddressMessage = () => (
<FormattedMessage
id='formhelper.invalidxlmaddress'
defaultMessage='Invalid Stellar address'
/>
<div data-e2e='invalidXlmAddress'>
<FormattedMessage
id='formhelper.invalidxlmaddress'
defaultMessage='Invalid Stellar address'
/>
</div>
)
export const InvalidIpListMessage = () => (
<FormattedMessage
Expand Down Expand Up @@ -135,7 +143,9 @@ export const RequiredDOBMessage = () => (
/>
)
export const RequiredMessage = () => (
<FormattedMessage id='formhelper.required' defaultMessage='Required' />
<div data-e2e='requiredMessage'>
<FormattedMessage id='formhelper.required' defaultMessage='Required' />
</div>
)
export const RequiredNumberMessage = () => (
<FormattedMessage
Expand Down

0 comments on commit 962c91f

Please sign in to comment.