diff --git a/src/hooks/useUserDepositDetails.ts b/src/hooks/useUserDepositDetails.ts index e0c38bb..9a6a1ef 100644 --- a/src/hooks/useUserDepositDetails.ts +++ b/src/hooks/useUserDepositDetails.ts @@ -135,9 +135,13 @@ export function useUserDepositDetails({ enabled = true }: UseUserDepositDetailsP const startAt = Number(depositInfo?.[1] ?? 0); const value = depositInfo?.[2] ?? 0; + // const endAt = dayjs + // .unix(startAt) + // .add(dayjs.duration({ months: Number(months) })) + // .unix(); const endAt = dayjs - .unix(startAt) - .add(dayjs.duration({ months: Number(months) })) + .unix(Number(startAt)) + .add(Number(months) * 30, 'day') .unix(); return { diff --git a/src/view/stake/_hooks/staked.ts b/src/view/stake/_hooks/staked.ts index 61435ef..9123f2a 100644 --- a/src/view/stake/_hooks/staked.ts +++ b/src/view/stake/_hooks/staked.ts @@ -80,9 +80,14 @@ export const useStakedDepositsOf = ({ account, enabled = true }: StakedDepositsO const months = depositOf?.[0] ?? 0n; const startAt = Number(depositOf?.[1] ?? 0); + // const endAt = dayjs + // .unix(Number(startAt)) + // .add(dayjs.duration({ months: Number(months) })) + // .unix(); + const endAt = dayjs .unix(Number(startAt)) - .add(dayjs.duration({ months: Number(months) })) + .add(Number(months) * 30, 'day') .unix(); return {