Skip to content

Commit

Permalink
streams fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
b4rtaz committed Apr 24, 2023
1 parent f14b1b8 commit 623886e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions packages/streams/src/Streams.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { ApiUtils } from '@moralisweb3/api-utils';
import { Core } from '@moralisweb3/common-core';
import { Streams } from './Streams';

describe('Streams', () => {
function setupStreams() {
const core = Core.create();
const apiUtils = ApiUtils.create(core);
const streams = Streams.create(core);
core.registerModules([apiUtils, streams]);

return { core, streams };
}

it('returns default baseUrl', () => {
const { streams } = setupStreams();

expect(streams.baseUrl).toBe('https://api.moralis-streams.com');
});
});
2 changes: 1 addition & 1 deletion packages/streams/src/Streams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class Streams extends ApiModule {
}

private constructor(core: Core) {
super(Streams.moduleName, core, BASE_URL);
super(Streams.moduleName, core, () => BASE_URL);
}

public setup() {
Expand Down

0 comments on commit 623886e

Please sign in to comment.