Skip to content

Commit

Permalink
Fix dates
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler17 committed Jul 14, 2024
1 parent 2861219 commit e78ef2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/delegates/api/fetchDelegateAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function fetchDelegateAddresses(network: SupportedNetworks): Promis
query: allDelegates
});
const delegates = data.delegates.map(delegate => ({
blockTimestamp: new Date(delegate?.blockTimestamp),
blockTimestamp: new Date(delegate?.blockTimestamp * 1000),
delegate: delegate?.ownerAddress,
voteDelegate: delegate?.id
})) as AllDelegatesEntry[];
Expand Down
2 changes: 1 addition & 1 deletion modules/delegates/api/fetchDelegatedTo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export async function fetchDelegatedTo(
const delegatingToWalletAddress = delegatingTo?.delegate?.toLowerCase();
// Get the expiration date of the delegate

const expirationDate = add(new Date(delegatingTo?.blockTimestamp), { years: 1 });
const expirationDate = add(new Date(delegatingTo?.blockTimestamp * 1000), { years: 1 });

//only v1 delegate contracts expire
const isAboutToExpire = delegatingTo.version === "1" && isAboutToExpireCheck(expirationDate);
Expand Down

0 comments on commit e78ef2e

Please sign in to comment.