Skip to content

Commit

Permalink
feat(apps/staking): Disable query polling
Browse files Browse the repository at this point in the history
  • Loading branch information
nevendyulgerov committed Jul 26, 2024
1 parent a466c99 commit 7260db1
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion apps/staking/src/graphql/hooks/useBlocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const useBlocks = (where: BlocksWhere = {}, count = 100) => {

return useQuery<BlocksData, BlocksVars>(BLOCKS, {
variables,
pollInterval: 30000,
notifyOnNetworkStatusChange: true,
});
};
Expand Down
1 change: 0 additions & 1 deletion apps/staking/src/graphql/hooks/useNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const useNodes = (
orderDirection: 'desc',
},
notifyOnNetworkStatusChange: true,
pollInterval: 600000, // Every 10 minutes
});
};

Expand Down
1 change: 0 additions & 1 deletion apps/staking/src/graphql/hooks/usePoolActivities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ const usePoolActivities = ({
first,
},
notifyOnNetworkStatusChange: true,
pollInterval: 600000,
});

useEffect(() => {
Expand Down
2 changes: 0 additions & 2 deletions apps/staking/src/graphql/hooks/usePoolBalances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const usePoolBalances = (
perPage = POOLS_PER_PAGE,
pool?: string
) => {
const tenMinutesInMs = 600000;
const filter = {
user: user?.toLowerCase() || undefined,
pool: pool?.toLowerCase() || undefined,
Expand All @@ -71,7 +70,6 @@ const usePoolBalances = (
orderDirection: 'desc',
},
notifyOnNetworkStatusChange: true,
pollInterval: tenMinutesInMs,
});
};

Expand Down
1 change: 0 additions & 1 deletion apps/staking/src/graphql/hooks/useStakingPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const useStakingPool = (id: string): StakingPool => {
id: id?.toLowerCase(),
},
notifyOnNetworkStatusChange: true,
pollInterval: 60000,
});

return data?.stakingPool;
Expand Down
2 changes: 0 additions & 2 deletions apps/staking/src/graphql/hooks/useStakingPoolFeeHistories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const useStakingPoolFeeHistories = (
options: UseStakingPoolFeeHistoriesOptions
) => {
const { pool = undefined, pageNumber = 0, perPage = 20 } = options;
const tenMinutesInMs = 600000;
const filter: UseStakingPoolFeeHistoriesFilter = {};

if (pool) {
Expand All @@ -46,7 +45,6 @@ const useStakingPoolFeeHistories = (
orderDirection: 'desc',
},
notifyOnNetworkStatusChange: true,
pollInterval: tenMinutesInMs,
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const useStakingPoolPerformance = (address: string) => {
timestamp_gte: getPastDaysInSeconds(7),
},
},
pollInterval: 60000,
}
);
};
Expand Down
2 changes: 0 additions & 2 deletions apps/staking/src/graphql/hooks/useStakingPoolUserHistories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const useStakingPoolUserHistories = (
pageNumber = 0,
perPage = 20,
} = options;
const tenMinutesInMs = 600000;
const filter: UseStakingPoolFeeHistoriesFilter = {
timestamp_gte: toUnixTimestamp(startTimestamp),
timestamp_lte: toUnixTimestamp(endTimestamp),
Expand All @@ -60,7 +59,6 @@ const useStakingPoolUserHistories = (
orderDirection: 'asc',
},
notifyOnNetworkStatusChange: true,
pollInterval: tenMinutesInMs,
});
};

Expand Down
1 change: 0 additions & 1 deletion apps/staking/src/graphql/hooks/useStakingPools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ const useStakingPools = ({
},
},
notifyOnNetworkStatusChange: true,
pollInterval: 600000, // Every 10 minutes
});
};

Expand Down
1 change: 0 additions & 1 deletion apps/staking/src/graphql/hooks/useSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const useSummary = (): Summary => {
id: '1',
},
notifyOnNetworkStatusChange: true,
pollInterval: 600000,
});
return data?.summary;
};
Expand Down
1 change: 0 additions & 1 deletion apps/staking/src/graphql/hooks/useTotalPoolBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const useTotalPoolBalance = (user: string) => {
orderDirection: 'desc',
},
notifyOnNetworkStatusChange: true,
pollInterval: 600000,
}
);

Expand Down
1 change: 0 additions & 1 deletion apps/staking/src/graphql/hooks/useUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const useUser = (id: string) => {
id: id?.toLowerCase(),
},
notifyOnNetworkStatusChange: true,
pollInterval: 60000,
});

return data?.user;
Expand Down
2 changes: 0 additions & 2 deletions apps/staking/src/graphql/hooks/useUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const useUsers = (
perPage = 10
) => {
const filter = id ? { id: id.toLowerCase() } : {};
const tenMinutesInMs = 600000;

return useQuery<UsersData, UsersVars>(USERS, {
variables: {
Expand All @@ -31,7 +30,6 @@ const useUsers = (
orderDirection: 'desc',
},
notifyOnNetworkStatusChange: true,
pollInterval: tenMinutesInMs,
});
};

Expand Down

0 comments on commit 7260db1

Please sign in to comment.