File tree 4 files changed +5
-4
lines changed 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ const stopBlockNum = "+10";
44
44
const substreams = new Substreams (outputModule, {
45
45
startBlockNum,
46
46
stopBlockNum,
47
- authorization: process .env .SUBSTREAMS_API_TOKEN
47
+ authorization: process .env .STREAMINGFAST_KEY // or SUBSTREAMS_API_TOKEN
48
48
});
49
49
50
50
(async () => {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const stopBlockNum = "+10";
10
10
const substreams = new Substreams ( outputModule , {
11
11
startBlockNum,
12
12
stopBlockNum,
13
- authorization : "< STREAMINGFAST_KEY or SUBSTREAMS_API_TOKEN>"
13
+ authorization : process . env . STREAMINGFAST_KEY // or SUBSTREAMS_API_TOKEN
14
14
} ) ;
15
15
16
16
( async ( ) => {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const stopBlockNum = "+10";
10
10
const substreams = new Substreams ( outputModule , {
11
11
startBlockNum,
12
12
stopBlockNum,
13
- authorization : process . env . STREAMINGFAST_KEY
13
+ authorization : process . env . STREAMINGFAST_KEY // or SUBSTREAMS_API_TOKEN
14
14
} ) ;
15
15
16
16
( async ( ) => {
Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ export async function authentication_token(api_key: string) {
46
46
47
47
export async function parseAuthorization ( authorization : string ) {
48
48
if ( authorization . includes ( "server_" ) ) {
49
- return ( await authentication_token ( authorization ) ) . token ;
49
+ const { token } = await authentication_token ( authorization ) ;
50
+ return token ;
50
51
}
51
52
return authorization ;
52
53
}
You can’t perform that action at this time.
0 commit comments