Skip to content

Commit

Permalink
token optional
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Mar 3, 2024
1 parent ffa82d7 commit e40383a
Show file tree
Hide file tree
Showing 2 changed files with 2 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.15.1",
"version": "0.15.2",
"description": "Substreams Sink",
"type": "module",
"exports": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function setup(options: RunOptions) {
// Substreams endpoint
let baseUrl = options.substreamsEndpoint;
const token = options.substreamsApiKey ?? options.substreamsApiToken;
if ( token.includes(".")) throw new Error("JWT token is not longer supported, please use Substreams API key instead");
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 e40383a

Please sign in to comment.