refact: move default value to function signature

This commit is contained in:
fryorcraken.eth 2022-08-24 19:04:31 +10:00
parent 5eec4564fe
commit a58691aabd
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 2 additions and 2 deletions

View File

@ -215,12 +215,12 @@ export class Nwaku {
async sendMessage(
message: WakuRelayMessage,
pubSubTopic?: string
pubSubTopic: string = DefaultPubSubTopic
): Promise<boolean> {
this.checkProcess();
return this.rpcCall<boolean>("post_waku_v2_relay_v1_message", [
pubSubTopic ? pubSubTopic : DefaultPubSubTopic,
pubSubTopic,
message,
]);
}