From 739ece00d1651fd67ba0437c51fdb636adc1879c Mon Sep 17 00:00:00 2001
From: Wan Qi Chen <495709+wa0x6e@users.noreply.github.com>
Date: Wed, 9 Oct 2024 12:45:06 +0400
Subject: [PATCH 1/2] fix: allow space avatar edition on testnet
---
src/components/SettingsProfileBlock.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/SettingsProfileBlock.vue b/src/components/SettingsProfileBlock.vue
index 4852afe6ecd1..227620ffa91a 100644
--- a/src/components/SettingsProfileBlock.vue
+++ b/src/components/SettingsProfileBlock.vue
@@ -44,11 +44,11 @@ const avatarNotReactive = ref(form.value.avatar);
From b58da0ce88b7d8f4bb9662f994417dba21ff57e8 Mon Sep 17 00:00:00 2001
From: Wan Qi Chen <495709+wa0x6e@users.noreply.github.com>
Date: Wed, 9 Oct 2024 12:57:12 +0400
Subject: [PATCH 2/2] feat: support both mainnet and testnet space avatar
---
src/components/AvatarSpace.vue | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/components/AvatarSpace.vue b/src/components/AvatarSpace.vue
index ed32f9cd398b..e5545367b067 100644
--- a/src/components/AvatarSpace.vue
+++ b/src/components/AvatarSpace.vue
@@ -13,6 +13,8 @@ const props = withDefaults(
}
);
+const { env } = useApp();
+
const avatarHash = computed(() => {
if (!props.space?.avatar) return '';
const hash = sha256(props.space.avatar).slice(0, 16);
@@ -24,8 +26,8 @@ const avatarHash = computed(() => {