Skip to content

Commit

Permalink
regionx paseo indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Oct 14, 2024
1 parent 6e49575 commit 673c99b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ POLKADOT_CORETIME_INDEXER="Subquery indexer for Polkadot Coretime"
KUSAMA_CORETIME_INDEXER="Subquery indexer for Kusama Coretime"
PASEO_CORETIME_INDEXER="Subquery indexer for Paseo Coretime"
ROCOCO_CORETIME_INDEXER="Subquery indexer for Rococo Coretime"
REGIONX_PASEO_INDEXER="Subquery indexer for RegionX Paseo"
COCOS_INDEXER="Subquery indexer for RegionX Cocos"

POLKADOT_CORETIME_DICT="Subquery dictionary for Polkadot Coretime"
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const nextConfig = {
WS_WESTEND_CORETIME_CHAIN: process.env.WS_WESTEND_CORETIME_CHAIN || '',

COCOS_INDEXER: process.env.COCOS_INDEXER || '',
REGIONX_PASEO_INDEXER: process.env.REGIONX_PASEO_INDEXER || '',

POLKADOT_CORETIME_INDEXER: process.env.POLKADOT_CORETIME_INDEXER || '',
KUSAMA_CORETIME_INDEXER: process.env.KUSAMA_CORETIME_INDEXER || '',
Expand Down
11 changes: 6 additions & 5 deletions src/apis/orders.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fetchGraphql } from '@/utils/fetchGraphql';

import { API_COCOS_INDEXER } from '@/consts';
import { API_REGIONX_PASEO_INDEXER } from '@/consts';
import { Address, ApiResponse } from '@/models';

export const fetchUserContribution = async (
Expand All @@ -22,7 +22,8 @@ export const fetchUserContribution = async (
}
}
}`;
return fetchGraphql(API_COCOS_INDEXER, query);
// TODO: don't hardcode the regionx paseo indexer.
return fetchGraphql(API_REGIONX_PASEO_INDEXER, query);
};

export const fetchOrders = async (after: string | null): Promise<ApiResponse> => {
Expand All @@ -45,7 +46,7 @@ export const fetchOrders = async (after: string | null): Promise<ApiResponse> =>
}
}
}`;
return fetchGraphql(API_COCOS_INDEXER, query);
return fetchGraphql(API_REGIONX_PASEO_INDEXER, query);
};

export const fetchCocosRegions = async (
Expand All @@ -70,7 +71,7 @@ export const fetchCocosRegions = async (
}
}
}`;
return fetchGraphql(API_COCOS_INDEXER, query, { filter, after });
return fetchGraphql(API_REGIONX_PASEO_INDEXER, query, { filter, after });
};

export const fetchProcessedOrders = async (
Expand All @@ -96,5 +97,5 @@ export const fetchProcessedOrders = async (
}
}
}`;
return fetchGraphql(API_COCOS_INDEXER, query);
return fetchGraphql(API_REGIONX_PASEO_INDEXER, query);
};
1 change: 1 addition & 0 deletions src/consts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const API_CORETIME_DICT = {
};

export const API_COCOS_INDEXER = process.env.COCOS_INDEXER ?? '';
export const API_REGIONX_PASEO_INDEXER = process.env.REGIONX_PASEO_INDEXER ?? '';

export const SUSBCAN_CORETIME_URL = {
[NetworkType.POLKADOT]: 'https://coretime-polkadot.subscan.io',
Expand Down

0 comments on commit 673c99b

Please sign in to comment.