diff --git a/package.json b/package.json index 923effd..0c47568 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "substreams-sink", - "version": "0.14.0", + "version": "0.14.1", "description": "Substreams Sink", "type": "module", "exports": "./dist/index.js", diff --git a/src/setup.ts b/src/setup.ts index 08a71c1..f243e5b 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -23,7 +23,8 @@ export async function setup(options: RunOptions) { // Substreams endpoint let baseUrl = options.substreamsEndpoint; - const token = options.substreamsApiToken ?? options.substreamsApiKey; + const token = options.substreamsApiKey ?? options.substreamsApiToken; + if ( token.includes(".")) throw new Error("JWT token is not longer supported, please use Substreams API key instead"); // append https if not present if (baseUrl.match(/http/) === null) {