-
Notifications
You must be signed in to change notification settings - Fork 0
Apply activation changes #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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`)]) |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| export enum CallName { | |
| export enum RouteName { |
app.vue
Outdated
| const { data: staking, refresh: refreshStaking } = await useFetch('/api/staking'); | ||
| const { data: supply, refresh: refreshSupply } = await useFetch('/api/supply'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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') |
814d15e to
ca4f77e
Compare
close #4