Wait for key lookup to finish before fetching trending and zapped

This commit is contained in:
Bojan Mojsilovic 2023-08-30 13:46:58 +02:00
parent ecc978a59a
commit 3b018287a2
2 changed files with 5 additions and 3 deletions

View File

@ -112,7 +112,7 @@ const ExploreSidebar: Component = () => {
scores: {},
}));
getTrendingUsers(`explore_sidebar_${APP_ID}`, account?.publicKey);
account?.isKeyLookupDone && getTrendingUsers(`explore_sidebar_${APP_ID}`, account?.publicKey);
}
});

View File

@ -84,8 +84,10 @@ const HomeSidebar: Component = () => {
},
}));
getTrending24h(account?.publicKey, `sidebar_trending_${APP_ID}`);
getMostZapped4h(account?.publicKey, `sidebar_zapped_${APP_ID}`);
if (account?.isKeyLookupDone) {
getTrending24h(account?.publicKey, `sidebar_trending_${APP_ID}`);
getMostZapped4h(account?.publicKey, `sidebar_zapped_${APP_ID}`);
}
}
});