Feat/800: Removed wallet-confirmation buffer, suspect it is not necessary

This commit is contained in:
sam-keen
2022-09-08 15:02:28 +01:00
parent 0ccb70b68b
commit 01cb4fe74e
2 changed files with 6 additions and 11 deletions
@@ -1,9 +1,5 @@
import { addMinutes, addHours, getTime } from 'date-fns';
import { addHours, getTime } from 'date-fns';
export const getClosingTimestamp = (proposalVoteDeadline: number) => {
// Add 5 minutes extra time to enable wallet confirmation without passing
// proposal min vote deadline
return getTime(
addHours(addMinutes(new Date(Date.now()), 5), proposalVoteDeadline)
);
return getTime(addHours(new Date(Date.now()), proposalVoteDeadline));
};
@@ -4,8 +4,7 @@ import { getClosingTimestamp } from './get-closing-timestamp';
export const getEnactmentTimestamp = (
proposalVoteDeadline: number,
enactmentDeadline: number
) => {
const closingTimestamp = getClosingTimestamp(proposalVoteDeadline);
return getTime(addHours(closingTimestamp, enactmentDeadline));
};
) =>
getTime(
addHours(getClosingTimestamp(proposalVoteDeadline), enactmentDeadline)
);