Browse Source

genuine check minor adjustment for the deviceInteraction

master
Anastasia Poupeney 7 years ago
parent
commit
03ad6bfab9
  1. 4
      src/components/GenuineCheck.js

4
src/components/GenuineCheck.js

@ -85,7 +85,7 @@ class GenuineCheck extends PureComponent<Props> {
.toPromise() .toPromise()
const isGenuine = res === '0000' const isGenuine = res === '0000'
if (!isGenuine) { if (!isGenuine) {
return Promise.reject(new Error('Device not genuine')) // TODO: use custom error class return Promise.reject(new DeviceNotGenuineError())
} }
setDeviceGenuinity(device, true) setDeviceGenuinity(device, true)
return Promise.resolve(true) return Promise.resolve(true)
@ -142,11 +142,11 @@ class GenuineCheck extends PureComponent<Props> {
return ( return (
<DeviceInteraction <DeviceInteraction
{...props}
waitBeforeSuccess={500} waitBeforeSuccess={500}
steps={steps} steps={steps}
onSuccess={onSuccess} onSuccess={onSuccess}
onFail={this.handleFail} onFail={this.handleFail}
{...props}
/> />
) )
} }

Loading…
Cancel
Save