diff options
author | obscuren <geffobscura@gmail.com> | 2014-04-30 20:42:57 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-04-30 20:42:57 +0800 |
commit | 183dbcc6a0e56bf46f6406d47134f3b88eb5eef1 (patch) | |
tree | 7071909a608c3fe63f8db57a59ebeacd5790009c /ethereal/assets | |
parent | e85d5dd428c71dd45060082a9af28a40a68a25e4 (diff) | |
download | go-tangerine-183dbcc6a0e56bf46f6406d47134f3b88eb5eef1.tar go-tangerine-183dbcc6a0e56bf46f6406d47134f3b88eb5eef1.tar.gz go-tangerine-183dbcc6a0e56bf46f6406d47134f3b88eb5eef1.tar.bz2 go-tangerine-183dbcc6a0e56bf46f6406d47134f3b88eb5eef1.tar.lz go-tangerine-183dbcc6a0e56bf46f6406d47134f3b88eb5eef1.tar.xz go-tangerine-183dbcc6a0e56bf46f6406d47134f3b88eb5eef1.tar.zst go-tangerine-183dbcc6a0e56bf46f6406d47134f3b88eb5eef1.zip |
fixed state object changes for eth api
Diffstat (limited to 'ethereal/assets')
-rw-r--r-- | ethereal/assets/ethereum.js | 14 | ||||
-rw-r--r-- | ethereal/assets/qml/webapp.qml | 5 | ||||
-rw-r--r-- | ethereal/assets/samplecoin.html | 3 |
3 files changed, 10 insertions, 12 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) diff --git a/ethereal/assets/qml/webapp.qml b/ethereal/assets/qml/webapp.qml index eebe8921f..2f3fef4d2 100644 --- a/ethereal/assets/qml/webapp.qml +++ b/ethereal/assets/qml/webapp.qml @@ -58,8 +58,7 @@ ApplicationWindow { case "transact": require(5) - // TODO this will change to 6 soon with sec being teh first argument - var tx = eth.transact(data.args[0], data.args[1],data.args[2],data.args[3],data.args[4]) + var tx = eth.transact(data.args[0], data.args[1], data.args[2],data.args[3],data.args[4],data.args[5]) postData(data._seed, tx) break case "create": @@ -116,7 +115,7 @@ ApplicationWindow { postEvent("block:new", block) } function onObjectChangeCb(stateObject) { - postEvent("object:change", stateObject) + postEvent("object:"+stateObject.address(), stateObject) } } diff --git a/ethereal/assets/samplecoin.html b/ethereal/assets/samplecoin.html index 73368a0b8..02efa8e01 100644 --- a/ethereal/assets/samplecoin.html +++ b/ethereal/assets/samplecoin.html @@ -9,7 +9,7 @@ function createTransaction() { var amount = document.querySelector("#amount").value; var data = "0x" + addr + "\n" + amount - eth.createTx(jefcoinAddr, 0, "10000000", "250", data, function(tx) { + eth.transact("", jefcoinAddr, 0, "10000000", "250", data, function(tx) { debug("received tx hash:", tx) }) } @@ -28,7 +28,6 @@ function init() { }); eth.watch(jefcoinAddr, function(stateObject) { - debug(stateObject); eth.getStorage(jefcoinAddr, key, function(storage) { document.querySelector("#currentAmount").innerHTML = "Amount: " + storage; }); |