Skip to content

Commit

Permalink
fix for time calc
Browse files Browse the repository at this point in the history
  • Loading branch information
igorgoldobin committed Feb 9, 2024
1 parent 914c816 commit fe8e6f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/state/user/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export function useUpdateTotalSeconds() {

const lastClaimedBlock = await contract.lastClaimedBlock(account)
const blockNumber = await contract.provider.getBlockNumber()
const totalSeconds = (blockNumber + offset - lastClaimedBlock.toNumber()) * blockTime
const totalSeconds = (lastClaimedBlock.toNumber() + offset - blockNumber) * blockTime

dispatch(setTotalSeconds(totalSeconds))
}, [contract, dispatch])
Expand Down

0 comments on commit fe8e6f8

Please sign in to comment.