mirror of https://github.com/status-im/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) {
|
async sendMessage(message: Message) {
|
||||||
this.checkProcess();
|
this.checkProcess();
|
||||||
|
|
||||||
let payload;
|
|
||||||
if (typeof message.payload === 'string') {
|
|
||||||
payload = strToHex(message.payload);
|
|
||||||
} else {
|
|
||||||
payload = bufToHex(message.payload);
|
|
||||||
}
|
|
||||||
|
|
||||||
const rpcMessage = {
|
const rpcMessage = {
|
||||||
payload,
|
payload: bufToHex(message.payload),
|
||||||
contentTopic: message.contentTopic,
|
contentTopic: message.contentTopic,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue