Update pacakeswap API provider. (#5766)

Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
This commit is contained in:
Adam R 2021-03-01 16:02:06 +01:00 committed by GitHub
parent 76ccac3437
commit c8f7520574
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ export const assetsURL = 'https://raw.githubusercontent.com/trustwallet/assets/m
// Force include & exclude config: list of token symbols, or symbol pairs (e.g. ["Cake", "DAI-WBNB"]).
export const PancakeSwap_ForceInclude: string[] = ["Cake", "DAI", "ETH", "TWT", "VAI", "USDT", "BLINK", "BTCB", "ALPHA", "INJ", "CTK", "UNI", "XVS", "BUSD", "HARD", "BIFI", "FRONT"];
export const PancakeSwap_ForceExclude: string[] = [];
export const PancakeSwap_TradingPairsUrl = "https://api.bscgraph.org/subgraphs/name/wowswap";
export const PancakeSwap_TradingPairsUrl = "https://api.bscgraph.org/subgraphs/name/cakeswap";
export const PancakeSwap_TradingPairsQuery = `
query pairs {
pairs(first: 150, orderBy: reserveUSD, orderDirection: desc) {

View File

@ -28,7 +28,7 @@ export async function getTradingPairs(apiUrl: string, subgraphQuery: string): Pr
try {
const result = await axios.post(apiUrl, postData).then(r => r.data);
if (!result || !result.data || !result.data.pairs) {
throw `Unexpected result: ${result}`;
throw `Unexpected result: ${JSON.stringify(result)}`;
}
const pairs = result.data.pairs;
console.log(`Retrieved ${pairs.length} trading pair infos`);