From 8bf0bb9eef8fcf074c9729de80d3090dd71f75af Mon Sep 17 00:00:00 2001 From: John Feras Date: Thu, 18 Jul 2024 09:50:25 -0400 Subject: [PATCH] Update tooltip logic since caching merge --- frontend/src/pages/AccountReceive.vue | 6 +++--- umbra-js/src/utils/utils.ts | 6 ------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/frontend/src/pages/AccountReceive.vue b/frontend/src/pages/AccountReceive.vue index a1e66f3d..9b85a2e2 100644 --- a/frontend/src/pages/AccountReceive.vue +++ b/frontend/src/pages/AccountReceive.vue @@ -164,8 +164,8 @@ function useScan() { : null ); const userAnnouncements = ref([]); - const mostRecentAnnouncementTimestamp = ref(); - const mostRecentAnnouncementBlockNumber = ref(); + const mostRecentAnnouncementTimestamp = ref(0); + const mostRecentAnnouncementBlockNumber = ref(0); const mostRecentBlockTimestamp = ref(0); const mostRecentBlockNumber = ref(0); @@ -391,7 +391,7 @@ function useScan() { return provider.getBlock('latest'); } - function(announcementsBatch: AnnouncementDetail[]) { + function updateMostRecentAnnouncementInfo(announcementsBatch: AnnouncementDetail[]) { announcementsBatch.forEach((announcement) => { const thisTimestamp = parseInt(announcement.timestamp); if (thisTimestamp > mostRecentAnnouncementTimestamp.value) { diff --git a/umbra-js/src/utils/utils.ts b/umbra-js/src/utils/utils.ts index cc63d18d..8ccbd26a 100644 --- a/umbra-js/src/utils/utils.ts +++ b/umbra-js/src/utils/utils.ts @@ -400,12 +400,6 @@ async function* fetchAllStealthKeyChangedEventsForRecipientAddressFromSubgraph( )) { yield stealthKeyChangedEvents; } - - if (!theEvent) { - console.log(`Searched the subgraph, but found no StealthKeyChangedEvents for address ${address}`); - throw new Error('No stealthKeyChangedEvents found matching address in subgraph'); - } - return theEvent; } /**