Browse Source

remove not needed anymore component

master
Anastasia Poupeney 7 years ago
parent
commit
262d1f4bf9
  1. 39
      src/components/DeviceCheckAddress.js
  2. 9
      src/components/modals/Receive/03-step-confirm-address.js

39
src/components/DeviceCheckAddress.js

@ -1,39 +0,0 @@
// @flow
import { PureComponent } from 'react'
type Props = {
render: ({ isVerified?: ?boolean }) => *,
}
type State = {
isVerified: null | boolean,
}
class CheckAddress extends PureComponent<Props, State> {
state = {
isVerified: null,
}
componentWillUnmount() {
this._isUnmounted = true
}
_isUnmounted = false
safeSetState = (...args: *) => {
if (this._isUnmounted) {
return
}
this.setState(...args)
}
render() {
const { render } = this.props
const { isVerified } = this.state
return render({ isVerified })
}
}
export default CheckAddress

9
src/components/modals/Receive/03-step-confirm-address.js

@ -9,7 +9,6 @@ import type { Device, T } from 'types/common'
import Box from 'components/base/Box'
import CurrentAddressForAccount from 'components/CurrentAddressForAccount'
import DeviceConfirm from 'components/DeviceConfirm'
import DeviceCheckAddress from 'components/DeviceCheckAddress'
const Container = styled(Box).attrs({
alignItems: 'center',
@ -51,13 +50,7 @@ export default (props: Props) => (
<Text>{props.t('receive:steps.confirmAddress.text')}</Text>
{props.account && <CurrentAddressForAccount account={props.account} />}
{props.device &&
props.account && (
<Box mb={2} mt={-1}>
<DeviceCheckAddress
render={() => <DeviceConfirm error={props.addressVerified === false} />}
/>
</Box>
)}
props.account && <DeviceConfirm mb={2} mt={-1} error={props.addressVerified === false} />}
</Fragment>
)}
</Container>

Loading…
Cancel
Save