From 25cb510849f95ca74fb96ad86121c38fb9987ab4 Mon Sep 17 00:00:00 2001 From: Nopfed Date: Wed, 24 Jul 2024 19:22:10 -0400 Subject: [PATCH] Resolve usernames from username contract state --- components/FeedItemCard.vue | 6 ++-- components/ResolveUsername.vue | 58 ++++++++++++++++++++++++++++------ 2 files changed, 52 insertions(+), 12 deletions(-) diff --git a/components/FeedItemCard.vue b/components/FeedItemCard.vue index e9812fe..49ae2ab 100644 --- a/components/FeedItemCard.vue +++ b/components/FeedItemCard.vue @@ -139,7 +139,8 @@ const { data, pending } = useLazyAsyncData(props.id, async () => { // .curations // .get(props.id) - // const { cachedValue: { state } } = await curation.contract.readState() + // const { cachedValue: { state } } = await curation + // .contract.readState() // const curatedPublications = [] // let count = 0 @@ -157,7 +158,8 @@ const { data, pending } = useLazyAsyncData(props.id, async () => { // desc: state.metadata.description as string, // state, // curatedPublications, - // username: await abc.usernames.resolveUsernameFromAddress(state.owner) + // username: await abc + // .usernames.resolveUsernameFromAddress(state.owner) // } // } catch (error) { // console.error('Error fetching curation', props.id, error) diff --git a/components/ResolveUsername.vue b/components/ResolveUsername.vue index fea5021..436c180 100644 --- a/components/ResolveUsername.vue +++ b/components/ResolveUsername.vue @@ -1,4 +1,4 @@ -