Browse Source

Don't display QR code on recipient field in Send modal

master
meriadec 7 years ago
parent
commit
2f8f6a59eb
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 16
      src/components/RecipientAddress/index.js
  2. 2
      src/components/modals/Send/fields/RecipientField.js

16
src/components/RecipientAddress/index.js

@ -85,14 +85,7 @@ class RecipientAddress extends PureComponent<Props, State> {
const { onChange, withQrCode, value, ...rest } = this.props const { onChange, withQrCode, value, ...rest } = this.props
const { qrReaderOpened } = this.state const { qrReaderOpened } = this.state
return ( const renderRight = withQrCode ? (
<Box relative justifyContent="center">
<Input
{...rest}
value={value}
withQrCode={withQrCode}
onChange={onChange}
renderRight={
<Right onClick={this.handleClickQrCode}> <Right onClick={this.handleClickQrCode}>
<IconQrCode size={16} /> <IconQrCode size={16} />
{qrReaderOpened && ( {qrReaderOpened && (
@ -104,8 +97,11 @@ class RecipientAddress extends PureComponent<Props, State> {
</Fragment> </Fragment>
)} )}
</Right> </Right>
} ) : null
/>
return (
<Box relative justifyContent="center">
<Input {...rest} value={value} onChange={onChange} renderRight={renderRight} />
</Box> </Box>
) )
} }

2
src/components/modals/Send/fields/RecipientField.js

@ -81,7 +81,7 @@ class RecipientField<Transaction> extends Component<Props<Transaction>, { isVali
/> />
<RecipientAddress <RecipientAddress
autoFocus={autoFocus} autoFocus={autoFocus}
withQrCode withQrCode={false}
error={ error={
!value || isValid !value || isValid
? null ? null

Loading…
Cancel
Save