From 76519c2651c4cd264da3fe1ed4e10a794de3fad3 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Sat, 13 Jan 2024 20:11:09 +0100 Subject: [PATCH] Enhance wrap of wakuDefaultPubsubTopic function --- package.json | 2 +- src/waku.js | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index a335883..2daca67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodejs-waku", - "version": "0.1.11", + "version": "0.1.12", "description": "NodeJs wrapper of a Waku node", "main": "waku.js", "scripts": { diff --git a/src/waku.js b/src/waku.js index 62f53ff..733e102 100644 --- a/src/waku.js +++ b/src/waku.js @@ -9,11 +9,8 @@ exports.wakuVersion = function() { wakuMod.wakuVersion(function(msg){ console.log("Waku Version: " + msg) }) } -exports.wakuDefaultPubsubTopic = function() { - // Example on how to retrieve a value from the waku library - var defaultPubsubTopic = "" - wakuMod.wakuDefaultPubsubTopic(function(msg){ defaultPubsubTopic = msg }) - console.log("Default pubsub topic: " + defaultPubsubTopic) +exports.wakuDefaultPubsubTopic = function(defaultPubsubTopicHandler) { + wakuMod.wakuDefaultPubsubTopic(defaultPubsubTopicHandler) } exports.wakuSetEventCallback = function(eventHandler) {