assist icon indicating copy to clipboard operation
assist copied to clipboard

inlineCustomMsgs not correctly added to websocket event

Open liamaharon opened this issue 5 years ago • 2 comments

Encountered this while adding websocket-event validation on the server.

If I add some inlineCustomMsgs to my .send call, event.inlineCustomMsgs is received as {} on the backend. I would have expected the object to contain some info about the inline custom messages.

If I don't add inlineCustomMsgs to my .send calls, event.inlineCustomMsgs is undefined.

@cmeisl @aaronbarnardsound since this is a very non-breaking bug and Aaron will be rewriting the notifications library soon, is it a waste of time to debug? Otherwise let me know and I can spend some time digging into it.

(I'm using web3 v1)

liamaharon avatar May 31 '19 06:05 liamaharon

My guess is that the object is empty due to it being stringified before being logged and it isn't serializable? We should probably just take it off the event object that gets logged to the server as it isn't necessary to log it anyway.

lnbc1QWFyb24 avatar May 31 '19 06:05 lnbc1QWFyb24

Yeah you're right, the values in the objects are all functions so not serializable. Makes sense to me to take them off the event object

liamaharon avatar May 31 '19 07:05 liamaharon