diff --git a/src/constants/subgraph.ts b/src/constants/subgraph.ts index 69628be..2a673c5 100644 --- a/src/constants/subgraph.ts +++ b/src/constants/subgraph.ts @@ -1,4 +1,4 @@ -import { post } from 'axios' +import axios from 'axios' import { CHAIN_IDS } from './chain' @@ -27,7 +27,7 @@ export class Subgraph { if (!SUBGRAPH_URL[chainId]) { throw new Error('Unsupported chain for subgraph') } - const response = await post(SUBGRAPH_URL[chainId], { + const response = await axios.post(SUBGRAPH_URL[chainId], { query, variables, operationName, diff --git a/tsconfig.base.json b/tsconfig.base.json index b41a20a..3ad88d8 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -25,7 +25,7 @@ // Interop constraints "esModuleInterop": false, - "allowSyntheticDefaultImports": false, + "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, "importHelpers": false, // This is only used for build validation. Since we do not have `tslib` installed, this will fail if we accidentally make use of anything that'd require injection of helpers. diff --git a/tsconfig.build.json b/tsconfig.build.json index 1d9e489..cc76626 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -7,5 +7,5 @@ "moduleResolution": "node", "sourceMap": true, "rootDir": "./src" - } + }, } \ No newline at end of file