From ff645160d012f948804cfa7d97a863dec94f499f Mon Sep 17 00:00:00 2001 From: Wan <495709+wa0x6e@users.noreply.github.com> Date: Mon, 15 Jul 2024 22:37:29 +0900 Subject: [PATCH] fix: load treasury asset balance only when necessary (#481) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: load treasury asset balance only when necessary * Update apps/ui/src/components/SpaceTreasury.vue Co-authored-by: Wiktor Tkaczyński --------- Co-authored-by: Wiktor Tkaczyński --- apps/ui/src/components/SpaceTreasury.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/ui/src/components/SpaceTreasury.vue b/apps/ui/src/components/SpaceTreasury.vue index cdbabe866..a6fb7aa57 100644 --- a/apps/ui/src/components/SpaceTreasury.vue +++ b/apps/ui/src/components/SpaceTreasury.vue @@ -105,6 +105,10 @@ const executionStrategy = computed(() => { }; }); +const hasStakeableAssets = computed(() => { + return !isReadOnly && assets.value.some(asset => asset.contractAddress === ETH_CONTRACT); +}); + function openModal(type: 'tokens' | 'nfts' | 'stake') { modalOpen.value[type] = true; } @@ -324,6 +328,7 @@ watchEffect(() => setTitle(`Treasury - ${props.space.name}`)); setTitle(`Treasury - ${props.space.name}`)); @add="addTx" />