Add logs on light push

This commit is contained in:
Franck Royer 2021-07-12 17:10:05 +10:00
parent 48bdb0b3f2
commit 7a0b947553
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 6 additions and 3 deletions

View File

@ -40,9 +40,12 @@ export default function BroadcastPublicKey({
setPublicKeyMsg(msg); setPublicKeyMsg(msg);
encodePublicKeyWakuMessage(msg) encodePublicKeyWakuMessage(msg)
.then((wakuMsg) => { .then((wakuMsg) => {
waku.lightPush.push(wakuMsg).catch((e) => { waku.lightPush
console.error('Failed to send Public Key Message', e); .push(wakuMsg)
}); .then((res) => console.log('Public Key Message pushed', res))
.catch((e) => {
console.error('Failed to send Public Key Message', e);
});
}) })
.catch((e) => { .catch((e) => {
console.log( console.log(