From 12af42f43cbcf91b79d06cda6ec9dd7b9e065296 Mon Sep 17 00:00:00 2001 From: Chaitanya Date: Wed, 4 Dec 2024 23:24:18 +0530 Subject: [PATCH 1/2] fix: Whitelist apechain safe (#1019) --- apps/ui/src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/ui/src/main.ts b/apps/ui/src/main.ts index 43a36a035..3f11e7f36 100644 --- a/apps/ui/src/main.ts +++ b/apps/ui/src/main.ts @@ -16,7 +16,8 @@ const knownHosts = [ 'worldassociation.org', 'safe.mainnet.frax.com', 'horizen-eon.safe.onchainden.com', - 'safe.fantom.network' + 'safe.fantom.network', + 'safe.apechain.com' ]; const parentUrl = window.location != window.parent.location From 8c28fad3227c97b99ab06d03cf5fe58a215539b5 Mon Sep 17 00:00:00 2001 From: Wan <495709+wa0x6e@users.noreply.github.com> Date: Thu, 5 Dec 2024 21:34:41 +0800 Subject: [PATCH 2/2] fix: fix invalid voting delay when set from space (#1020) * fix: fix invalid voting delay when set from space * refactor: set proposal start and end time only in Editor --- apps/ui/src/composables/useActions.ts | 2 ++ apps/ui/src/networks/evm/actions.ts | 1 + apps/ui/src/networks/offchain/actions.ts | 4 ++-- apps/ui/src/networks/starknet/actions.ts | 1 + apps/ui/src/networks/types.ts | 1 + apps/ui/src/views/Space/Editor.vue | 1 + 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/ui/src/composables/useActions.ts b/apps/ui/src/composables/useActions.ts index 8fae763f9..384efcc5e 100644 --- a/apps/ui/src/composables/useActions.ts +++ b/apps/ui/src/composables/useActions.ts @@ -286,6 +286,7 @@ export function useActions() { choices: string[], labels: string[], app: string, + created: number, start: number, min_end: number, max_end: number, @@ -312,6 +313,7 @@ export function useActions() { choices, labels, app, + created, start, min_end, max_end, diff --git a/apps/ui/src/networks/evm/actions.ts b/apps/ui/src/networks/evm/actions.ts index 402f307f1..1445961e7 100644 --- a/apps/ui/src/networks/evm/actions.ts +++ b/apps/ui/src/networks/evm/actions.ts @@ -210,6 +210,7 @@ export function createActions( choices: string[], labels: string[], app: string, + created: number, start: number, min_end: number, max_end: number, diff --git a/apps/ui/src/networks/offchain/actions.ts b/apps/ui/src/networks/offchain/actions.ts index 0e8906f4a..b8452faf3 100644 --- a/apps/ui/src/networks/offchain/actions.ts +++ b/apps/ui/src/networks/offchain/actions.ts @@ -131,13 +131,13 @@ export function createActions( choices: string[], labels: string[], app: string, + created: number, start: number, min_end: number, max_end: number, executions: ExecutionInfo[] ) { const provider = getProvider(space.snapshot_chain_id as number); - const plugins = await getPlugins(executions); const data = { @@ -153,7 +153,7 @@ export function createActions( snapshot: (await provider.getBlockNumber()) - EDITOR_SNAPSHOT_OFFSET, plugins: JSON.stringify(plugins), app: app || EDITOR_APP_NAME, - timestamp: Math.floor(Date.now() / 1000) + timestamp: created }; 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 9c25da8c0..34bea9659 100644 --- a/apps/ui/src/networks/starknet/actions.ts +++ b/apps/ui/src/networks/starknet/actions.ts @@ -229,6 +229,7 @@ export function createActions( choices: string[], labels: string[], app: string, + created: number, start: number, min_end: number, max_end: number, diff --git a/apps/ui/src/networks/types.ts b/apps/ui/src/networks/types.ts index 9d8d76670..6fcfcaf7e 100644 --- a/apps/ui/src/networks/types.ts +++ b/apps/ui/src/networks/types.ts @@ -142,6 +142,7 @@ export type ReadOnlyNetworkActions = { choices: string[], labels: string[], app: string, + created: number, start: number, min_end: number, max_end: number, diff --git a/apps/ui/src/views/Space/Editor.vue b/apps/ui/src/views/Space/Editor.vue index ee067e76e..dab025e7f 100644 --- a/apps/ui/src/views/Space/Editor.vue +++ b/apps/ui/src/views/Space/Editor.vue @@ -228,6 +228,7 @@ async function handleProposeClick() { choices, proposal.value.labels, appName.length <= 128 ? appName : '', + currentTime, start, minEnd, maxEnd,