diff options
Diffstat (limited to 'ethereal/assets/ethereum.js')
-rw-r--r-- | ethereal/assets/ethereum.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ethereal/assets/ethereum.js b/ethereal/assets/ethereum.js index bb6346cab..916655d5e 100644 --- a/ethereal/assets/ethereum.js +++ b/ethereal/assets/ethereum.js @@ -42,13 +42,13 @@ window.eth = { }, watch: function(address, storageAddrOrCb, cb) { - var ev = "changed:"+address; - + var ev; if(cb === undefined) { cb = storageAddrOrCb; storageAddrOrCb = ""; + ev = "object:"+address; } else { - ev += ":"+storageAddrOrCb; + ev = "storage:"+address+":"+storageAddrOrCb; } eth.on(ev, cb) @@ -57,13 +57,13 @@ window.eth = { }, disconnect: function(address, storageAddrOrCb, cb) { - var ev = "changed:"+address; - + var ev; if(cb === undefined) { cb = storageAddrOrCb; - storageAddrOrCb = null; + storageAddrOrCb = ""; + ev = "object:"+address; } else { - ev += ":"+storageAddrOrCb; + ev = "storage:"+address+":"+storageAddrOrCb; } eth.off(ev, cb) |