Skip to content

Commit

Permalink
fix: nit: add a day to locked shares table predicted times (#1138)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleroooo authored Oct 15, 2024
1 parent 62e60c0 commit 0eb6b6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/vaults/VaultLockedSharesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import styled from 'styled-components';
import { VaultShareUnlock } from '@/constants/abacus';
import { ButtonShape, ButtonSize } from '@/constants/buttons';
import { STRING_KEYS } from '@/constants/localization';
import { timeUnits } from '@/constants/time';

import { useApiState } from '@/hooks/useApiState';
import { useStringGetter } from '@/hooks/useStringGetter';
Expand Down Expand Up @@ -78,7 +79,8 @@ const VaultLockedSharesTable = ({
const estimatedUnlockMs = mapIfPresent(
unlockBlockHeight,
height,
(unblock, actual) => new Date().valueOf() + (unblock - actual) * 1000
// add a day so users don't get confused about why their money isn't unlocked when the day arrives
(unblock, actual) => new Date().valueOf() + (unblock - actual) * 1000 + timeUnits.day
);
return (
<Output
Expand Down

0 comments on commit 0eb6b6d

Please sign in to comment.