Skip to content

Commit

Permalink
add JWT error
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Feb 13, 2024
1 parent cb3449b commit 5b2225f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "substreams-sink",
"version": "0.14.0",
"version": "0.14.1",
"description": "Substreams Sink",
"type": "module",
"exports": "./dist/index.js",
Expand Down
3 changes: 2 additions & 1 deletion src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5b2225f

Please sign in to comment.