diff --git a/src/test_utils/nim_waku.ts b/src/test_utils/nim_waku.ts index e5537195b5..c0b0fd2b11 100644 --- a/src/test_utils/nim_waku.ts +++ b/src/test_utils/nim_waku.ts @@ -108,15 +108,8 @@ export class NimWaku { async sendMessage(message: Message) { this.checkProcess(); - let payload; - if (typeof message.payload === 'string') { - payload = strToHex(message.payload); - } else { - payload = bufToHex(message.payload); - } - const rpcMessage = { - payload, + payload: bufToHex(message.payload), contentTopic: message.contentTopic, };