Skip to content

Commit

Permalink
Merge pull request #28 from pinax-network/fix/token
Browse files Browse the repository at this point in the history
fix token optional
  • Loading branch information
DenisCarriere authored Mar 3, 2024
2 parents ffa82d7 + e40383a commit 6d2f9b5
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 6d2f9b5

Please sign in to comment.