Skip to content
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

wip: manage token page #1309

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: add network id as dependency of useQueries
MikaelVallenet committed Oct 18, 2024
commit 42bfdd44daab89808bad6de74cf4dd8077c2394b
2 changes: 1 addition & 1 deletion packages/screens/LaunchpadERC20/hooks/useLastAirdrops.ts
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ import { extractGnoJSONString } from "@/utils/gno";
import { zodAidrop } from "@/utils/types/types";

export const useLastAirdrops = (networkId: string) => {
return useQuery(["lastAirdrops"], async () => {
return useQuery(["lastAirdrops", networkId], async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return useQuery(["lastAirdrops", networkId], async () => {
return useQuery(["erc20LaunchpadLastAirdrops", networkId], async () => {

we should use very explicit query keys prefixes to avoid conflicts in the future as these kind of conflicts are hard to pinpoint

const gnoNetwork = getGnoNetwork(networkId);
if (!gnoNetwork) {
return null;
2 changes: 1 addition & 1 deletion packages/screens/LaunchpadERC20/hooks/useLastSales.ts
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ import { extractGnoJSONString } from "@/utils/gno";
import { zodSale } from "@/utils/types/types";

export const useLastSales = (networkId: string) => {
return useQuery(["lastSales"], async () => {
return useQuery(["lastSales", networkId], async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

explicit query keys

const gnoNetwork = getGnoNetwork(networkId);
if (!gnoNetwork) {
return null;
2 changes: 1 addition & 1 deletion packages/screens/LaunchpadERC20/hooks/useLastTokens.ts
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ import { extractGnoJSONString } from "@/utils/gno";
import { zodToken } from "@/utils/types/types";

export const useLastTokens = (networkId: string) => {
return useQuery(["lastTokens"], async () => {
return useQuery(["lastTokens", networkId], async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

explicit query keys

const gnoNetwork = getGnoNetwork(networkId);
if (!gnoNetwork) {
return null;
2 changes: 1 addition & 1 deletion packages/screens/LaunchpadERC20/hooks/useUserTokens.ts
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import { extractGnoJSONString } from "@/utils/gno";
import { zodToken } from "@/utils/types/types";

export const useUserTokens = (networkId: string, addr: string) => {
return useQuery(["userTokens", addr], async () => {
return useQuery(["userTokens", addr, networkId], async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

explicit query keys

const gnoNetwork = getGnoNetwork(networkId);
if (!gnoNetwork) {
return null;