Skip to content

Conversation

@gabaldon
Copy link
Contributor

close #4

app.vue Outdated
const { data, refresh } = await useFetch("/api/staking")
const { data, refresh } = await useLazyAsyncData('data-stamp-driver', async () => {
return await Promise.all([$fetch('/api/staking'), $fetch(`${EXPLORER_API}/network/supply?key=current_supply`)])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this logic to the server API to enable caching and avoid redundant calls to the block explorer? Also, I'd suggest not using useLazyAsyncData for a single call — the block explorer and RPC may have different response times, so we can display partial data while waiting for the rest to load

types.ts Outdated
amount: number
withdrawer: string,
}
export enum CallName {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export enum CallName {
export enum RouteName {

app.vue Outdated
Comment on lines 45 to 46
const { data: staking, refresh: refreshStaking } = await useFetch('/api/staking');
const { data: supply, refresh: refreshSupply } = await useFetch('/api/supply');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { data: staking, refresh: refreshStaking } = await useFetch('/api/staking');
const { data: supply, refresh: refreshSupply } = await useFetch('/api/supply');
const { data: staking, refresh: refreshStaking } = await useFetch('/api/staking')
const { data: supply, refresh: refreshSupply } = await useFetch('/api/supply')

@gabaldon gabaldon force-pushed the feat/apply-activation-changes branch from 814d15e to ca4f77e Compare April 11, 2025 12:14
@Tommytrg Tommytrg merged commit 0c80ad8 into main Apr 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apply changes after 2.0 activation

3 participants