Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

shh.watch doesn't work properly. #485

Closed
gavofyork opened this issue Nov 6, 2014 · 0 comments
Closed

shh.watch doesn't work properly. #485

gavofyork opened this issue Nov 6, 2014 · 0 comments
Assignees
Milestone

Comments

@gavofyork
Copy link
Contributor

The line:

shh.watch({ 'topic': [web3.fromAscii('chat'), web3.fromAscii('namechange')] }).arrived(function(f) { newName(f); });

in dapp-bin/chat/chat.html (Marek's branch) doesn't work. newName is not called when messages of that type arrive. Oddly, the line after:

shh.watch({ 'topic': [web3.fromAscii('chat'), myIdPromise], 'to': myIdPromise }).arrived(function(f) { newMessage(f); });

works fine.

Typing the former line in to the JS Debug Console gives a result as expected - newName is called when an appropriate message is received. The latter line includes promises, I can only assume that this makes the difference.

@gavofyork gavofyork added this to the poc-7 milestone Nov 6, 2014
@debris debris closed this as completed in 2b18137 Nov 8, 2014
gavofyork pushed a commit that referenced this issue Nov 8, 2014
proper error handling in javascript api, fixed #485
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants