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(
|
async ensureSubscriptions(
|
||||||
pubsubTopics: [string] = [DefaultPubSubTopic]
|
pubsubTopics: string[] = [DefaultPubSubTopic]
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
this.checkProcess();
|
this.checkProcess();
|
||||||
|
|
||||||
return this.rpcCall<boolean>(
|
return this.rpcCall<boolean>("post_waku_v2_relay_v1_subscriptions", [
|
||||||
"post_waku_v2_relay_v1_subscriptions",
|
|
||||||
pubsubTopics
|
pubsubTopics
|
||||||
);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
async sendMessage(
|
async sendMessage(
|
||||||
|
|
|
@ -25,6 +25,8 @@ describe("Waku Light Push [node only] - custom pubsub topic", function () {
|
||||||
nwaku,
|
nwaku,
|
||||||
customPubSubTopic
|
customPubSubTopic
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await nwaku.ensureSubscriptions([customPubSubTopic]);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.afterEach(async function () {
|
this.afterEach(async function () {
|
||||||
|
|
|
@ -34,6 +34,8 @@ describe("Waku Light Push [node only]", function () {
|
||||||
nwaku,
|
nwaku,
|
||||||
DefaultPubSubTopic
|
DefaultPubSubTopic
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await nwaku.ensureSubscriptions();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.afterEach(async function () {
|
this.afterEach(async function () {
|
||||||
|
|
Loading…
Reference in New Issue