From 78ab7d1feb93c3cda1d58cde26e7ae75af451932 Mon Sep 17 00:00:00 2001 From: Wan Qi Chen <495709+wa0x6e@users.noreply.github.com> Date: Mon, 30 Sep 2024 01:01:19 +0400 Subject: [PATCH] fix: fix wrong address case when resolved from ENS name --- 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 edbaba9fe2a7..a651a7b748dd 100644 --- a/src/composables/useDelegates.ts +++ b/src/composables/useDelegates.ts @@ -1,4 +1,5 @@ import { getInstance } from '@snapshot-labs/lock/plugins/vue3'; +import { getAddress } from '@ethersproject/address'; import { DelegateWithPercent, DelegatesVote, @@ -92,7 +93,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)); delegate.value = response; } catch (e) { console.error(e);