mirror of https://github.com/waku-org/js-waku.git
fix: subscription RPC & added test subscriptions (#1587)
Co-authored-by: Sasha <118575614+weboko@users.noreply.github.com>
This commit is contained in:
parent
bcd65a1935
commit
6fa106aa7f
|
@ -210,14 +210,13 @@ export class NimGoNode {
|
|||
}
|
||||
|
||||
async ensureSubscriptions(
|
||||
pubsubTopics: [string] = [DefaultPubSubTopic]
|
||||
pubsubTopics: string[] = [DefaultPubSubTopic]
|
||||
): Promise<boolean> {
|
||||
this.checkProcess();
|
||||
|
||||
return this.rpcCall<boolean>(
|
||||
"post_waku_v2_relay_v1_subscriptions",
|
||||
return this.rpcCall<boolean>("post_waku_v2_relay_v1_subscriptions", [
|
||||
pubsubTopics
|
||||
);
|
||||
]);
|
||||
}
|
||||
|
||||
async sendMessage(
|
||||
|
|
|
@ -25,6 +25,8 @@ describe("Waku Light Push [node only] - custom pubsub topic", function () {
|
|||
nwaku,
|
||||
customPubSubTopic
|
||||
);
|
||||
|
||||
await nwaku.ensureSubscriptions([customPubSubTopic]);
|
||||
});
|
||||
|
||||
this.afterEach(async function () {
|
||||
|
|
|
@ -34,6 +34,8 @@ describe("Waku Light Push [node only]", function () {
|
|||
nwaku,
|
||||
DefaultPubSubTopic
|
||||
);
|
||||
|
||||
await nwaku.ensureSubscriptions();
|
||||
});
|
||||
|
||||
this.afterEach(async function () {
|
||||
|
|
Loading…
Reference in New Issue