Skip to content

Commit

Permalink
Fix for incorrect expiry time
Browse files Browse the repository at this point in the history
  • Loading branch information
dmanjunath committed Oct 31, 2020
1 parent 3949900 commit 843a0d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/TransactionStatus/TransactionStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const WaitingTransaction: React.FC<WaitingTransactionProps> = props => {
}, [status, onClose])

// @ts-ignore
const { name, target, lockupDuration } = props
const { name, target } = props
const onCancelSubmit = useCallback(() => {
if (name === PendingTransactionName.RemoveDelegator) {
cancelTransaction(target)
Expand All @@ -95,7 +95,7 @@ const WaitingTransaction: React.FC<WaitingTransactionProps> = props => {
}, [name, target, cancelTransaction])
const { timeRemaining } = useTimeRemaining(
props.lockupExpiryBlock,
lockupDuration
0 /* period - 0 because lockupExpiry has time period baked in */
)

return (
Expand Down
2 changes: 1 addition & 1 deletion src/store/cache/protocol/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export const useTimeRemaining = (block: number, period: number | null) => {
if (currentBlock > targetBlock) {
setTimeRemaining(0)
} else {
setTimeRemaining((targetBlock - currentBlock) * averageBlockTime)
setTimeRemaining((targetBlock - currentBlock) * averageBlockTime * 1000)
}
}
}, [averageBlockTime, currentBlock, block, period, targetBlock])
Expand Down

0 comments on commit 843a0d8

Please sign in to comment.