Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcos20 committed Oct 1, 2020
1 parent 9b7f911 commit 2e04ece
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/datatokens/Datatokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,13 @@ export class DataTokens {
String(events[i].returnValues.serviceId) === String(serviceId) &&
events[i].returnValues.consumer.toLowerCase() === address.toLowerCase()
) {
if (timeout === 0) return events[i].transactionHash
const blockDetails = await this.web3.eth.getBlock(events[i].blockHash)
const expiry = new BigNumber(blockDetails.timestamp).plus(timeout)
const unixTime = new BigNumber(Math.floor(Date.now() / 1000))
if (unixTime.isLessThan(expiry)) return events[i].transactionHash
//}
if (timeout === 0) return events[i].transactionHash
const blockDetails = await this.web3.eth.getBlock(events[i].blockHash)
const expiry = new BigNumber(blockDetails.timestamp).plus(timeout)
const unixTime = new BigNumber(Math.floor(Date.now() / 1000))
if (unixTime.isLessThan(expiry)) return events[i].transactionHash
}
}
return null
}
}

0 comments on commit 2e04ece

Please sign in to comment.