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 c7bb3dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/ui/src/views/Space/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { getNetwork, offchainNetworks } from '@/networks';
import { Contact, Space, Transaction, VoteType } from '@/types';
const DEFAULT_VOTING_DELAY = 60 * 60 * 24 * 3;
const NOW = Math.floor(Date.now() / 1000);
const TITLE_DEFINITION = {
type: 'string',
Expand Down Expand Up @@ -175,9 +176,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 +235,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 c7bb3dc

Please sign in to comment.