aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/assets
diff options
context:
space:
mode:
Diffstat (limited to 'ethereal/assets')
-rw-r--r--ethereal/assets/ethereum.js14
-rw-r--r--ethereal/assets/qml/webapp.qml5
-rw-r--r--ethereal/assets/samplecoin.html3
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;
});