mirror of https://github.com/waku-org/js-waku.git
Improve logging upon receiving messages
This commit is contained in:
parent
3c618f435e
commit
f020aa7a8c
|
@ -119,6 +119,7 @@ function handlePublicKeyMessage(
|
|||
setter: Dispatch<SetStateAction<Map<string, string>>>,
|
||||
msg: WakuMessage
|
||||
) {
|
||||
console.log('Public Key Message received:', msg);
|
||||
if (!msg.payload) return;
|
||||
const publicKeyMsg = PublicKeyMessage.decode(msg.payload);
|
||||
if (!publicKeyMsg) return;
|
||||
|
@ -140,7 +141,7 @@ async function handleDirectMessage(
|
|||
address: string,
|
||||
wakuMsg: WakuMessage
|
||||
) {
|
||||
console.log('Waku Message received:', wakuMsg);
|
||||
console.log('Direct Message received:', wakuMsg);
|
||||
if (!wakuMsg.payload) return;
|
||||
const directMessage: DirectMessage = decode(wakuMsg.payload);
|
||||
if (directMessage.toAddress !== address) return;
|
||||
|
|
Loading…
Reference in New Issue