mirror of https://github.com/waku-org/js-waku.git
Payload is now always a buffer
This commit is contained in:
parent
d9a7166098
commit
fe7daebbb0
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue