From 620118d409aeac5c20a3ca31fdc4ba53572e1cb0 Mon Sep 17 00:00:00 2001 From: Wan <495709+wa0x6e@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:30:24 +0900 Subject: [PATCH] fix: fix wrong address case when resolved from ENS name (#4894) --- src/composables/useDelegates.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/composables/useDelegates.ts b/src/composables/useDelegates.ts index 72f5e2654f9..d64b7dd7bd1 100644 --- a/src/composables/useDelegates.ts +++ b/src/composables/useDelegates.ts @@ -1,5 +1,6 @@ import { LEADERBOARD_QUERY } from '@/helpers/queries'; import { getInstance } from '@snapshot-labs/lock/plugins/vue3'; +import { getAddress } from '@ethersproject/address'; import { DelegateWithPercent, ExtendedSpace } from '@/helpers/interfaces'; import { DelegationTypes, @@ -88,7 +89,7 @@ export function useDelegates(space: ExtendedSpace) { try { const resolvedAddress = await resolveName(addressOrEns); if (!resolvedAddress) return; - const response = await reader.getDelegate(resolvedAddress); + const response = await reader.getDelegate(getAddress(resolvedAddress)); loadStats([response.id]); delegate.value = response; } catch (e) {