diff --git a/apps/ui/src/composables/useActions.ts b/apps/ui/src/composables/useActions.ts index af744e40d..8fae763f9 100644 --- a/apps/ui/src/composables/useActions.ts +++ b/apps/ui/src/composables/useActions.ts @@ -286,6 +286,9 @@ export function useActions() { choices: string[], labels: string[], app: string, + start: number, + min_end: number, + max_end: number, executions: ExecutionInfo[] | null ) { if (!web3.value.account) { @@ -309,6 +312,9 @@ export function useActions() { choices, labels, app, + start, + min_end, + max_end, executions ) ); diff --git a/apps/ui/src/networks/evm/actions.ts b/apps/ui/src/networks/evm/actions.ts index 837b1394e..402f307f1 100644 --- a/apps/ui/src/networks/evm/actions.ts +++ b/apps/ui/src/networks/evm/actions.ts @@ -210,6 +210,9 @@ export function createActions( choices: string[], labels: string[], app: string, + start: number, + min_end: number, + max_end: number, executions: ExecutionInfo[] | null ) => { await verifyNetwork(web3, chainId); diff --git a/apps/ui/src/networks/offchain/actions.ts b/apps/ui/src/networks/offchain/actions.ts index 14edfa766..0e8906f4a 100644 --- a/apps/ui/src/networks/offchain/actions.ts +++ b/apps/ui/src/networks/offchain/actions.ts @@ -131,10 +131,11 @@ export function createActions( choices: string[], labels: string[], app: string, + start: number, + min_end: number, + max_end: number, executions: ExecutionInfo[] ) { - const currentTime = Math.floor(Date.now() / 1000); - const startTime = currentTime + space.voting_delay; const provider = getProvider(space.snapshot_chain_id as number); const plugins = await getPlugins(executions); @@ -147,12 +148,12 @@ export function createActions( discussion, choices, labels, - start: startTime, - end: startTime + space.min_voting_period, + start, + end: min_end, snapshot: (await provider.getBlockNumber()) - EDITOR_SNAPSHOT_OFFSET, plugins: JSON.stringify(plugins), app: app || EDITOR_APP_NAME, - timestamp: currentTime + timestamp: Math.floor(Date.now() / 1000) }; return client.propose({ signer: web3.getSigner(), data }); diff --git a/apps/ui/src/networks/starknet/actions.ts b/apps/ui/src/networks/starknet/actions.ts index dd430164d..9c25da8c0 100644 --- a/apps/ui/src/networks/starknet/actions.ts +++ b/apps/ui/src/networks/starknet/actions.ts @@ -229,6 +229,9 @@ export function createActions( choices: string[], labels: string[], app: string, + start: number, + min_end: number, + max_end: number, executions: ExecutionInfo[] | null ) => { const executionInfo = executions?.[0]; diff --git a/apps/ui/src/networks/types.ts b/apps/ui/src/networks/types.ts index fb4018a86..9d8d76670 100644 --- a/apps/ui/src/networks/types.ts +++ b/apps/ui/src/networks/types.ts @@ -142,6 +142,9 @@ export type ReadOnlyNetworkActions = { choices: string[], labels: string[], app: string, + start: number, + min_end: number, + max_end: number, executions: ExecutionInfo[] | null ): Promise; updateProposal(