Skip to content

Commit

Permalink
fix: use single source of truth for current time
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Dec 5, 2024
1 parent 5a264de commit e656373
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/ui/src/views/Space/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const DISCUSSION_DEFINITION = {
examples: ['e.g. https://forum.balancer.fi/t/proposal…']
};
const NOW = Math.floor(Date.now() / 1000);
const props = defineProps<{
space: Space;
}>();
Expand Down Expand Up @@ -175,9 +177,7 @@ const proposalLimitReached = computed(
const propositionPower = computed(() => getPropositionPower(props.space));
const proposalStart = computed(
() => Math.floor(Date.now() / 1000) + props.space.voting_delay
);
const proposalStart = computed(() => NOW + props.space.voting_delay);
const proposalMinEnd = computed(
() =>
Expand Down Expand Up @@ -236,6 +236,7 @@ async function handleProposeClick() {
choices,
proposal.value.labels,
appName.length <= 128 ? appName : '',
NOW,
proposalStart.value,
proposalMinEnd.value,
proposalMinEnd.value,
Expand Down

0 comments on commit e656373

Please sign in to comment.