Update launch incentives to season 2 (#218)

* Update launch incentives to season 2

* update api url

---------

Co-authored-by: Aleka Cheung <aforaleka@gmail.com>
This commit is contained in:
Bill
2024-01-04 19:14:23 -08:00
committed by GitHub
co-authored by Aleka Cheung
parent 3fc43e8a12
commit 4a64d59546
3 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -24,6 +24,8 @@ import { openDialog } from '@/state/dialogs';
import { log } from '@/lib/telemetry';
const SEASON_NUMBER = 2;
export const LaunchIncentivesPanel = () => {
const { isNotTablet } = useBreakpoints();
const dispatch = useDispatch();
@@ -71,7 +73,7 @@ const EstimatedRewards = () => {
queryKey: `launch_incentives_rewards_${dydxAddress ?? ''}`,
queryFn: async () => {
if (!dydxAddress) return undefined;
const resp = await fetch(`https://cloud.chaoslabs.co/query/api/dydx/points/${dydxAddress}`);
const resp = await fetch(`https://cloud.chaoslabs.co/query/api/dydx/points/${dydxAddress}?n=${SEASON_NUMBER}`);
return (await resp.json())?.incentivePoints;
},
onError: (error: Error) => log('LaunchIncentives/fetchPoints', error),
@@ -85,9 +87,7 @@ const EstimatedRewards = () => {
<Styled.Season>
{stringGetter({
key: STRING_KEYS.LAUNCH_INCENTIVES_SEASON_NUM,
params: {
SEASON_NUMBER: 1,
},
params: { SEASON_NUMBER },
})}
</Styled.Season>
</div>