Browse Source

add more logs in genuine check

master
Gaëtan Renaudeau 7 years ago
parent
commit
eb76d60ce7
  1. 7
      src/components/GenuineCheck.js

7
src/components/GenuineCheck.js

@ -82,10 +82,17 @@ class GenuineCheck extends PureComponent<Props> {
await delay(GENUINE_CACHE_DELAY)
return true
}
const beforeDate = Date.now()
const res = await getIsGenuine
.send({ devicePath: device.path, deviceInfo })
.pipe(timeout(GENUINE_TIMEOUT))
.toPromise()
logger.log(`genuine check resulted ${res} after ${(Date.now() - beforeDate) / 1000}s`, {
deviceInfo,
})
const isGenuine = res === '0000'
if (!isGenuine) {
throw new DeviceNotGenuineError()

Loading…
Cancel
Save