Minor fixes and sample coin "improvements"

This commit is contained in:
obscuren
2014-04-24 00:01:22 +02:00
parent 43f1214f97
commit bb72347acf
8 changed files with 112 additions and 27 deletions

View File

@@ -5,6 +5,10 @@ function postData(data, cb) {
eth._callbacks[data._seed] = cb;
}
if(data.args === undefined) {
data.args = []
}
navigator.qt.postMessage(JSON.stringify(data));
}
@@ -34,6 +38,14 @@ window.eth = {
createTx: function(recipient, value, gas, gasPrice, data, cb) {
postData({call: "createTx", args: [recipient, value, gas, gasPrice, data]}, cb)
},
getStorage: function(address, storageAddress, cb) {
postData({call: "getStorage", args: [address, storageAddress]}, cb)
},
getKey: function(cb) {
postData({call: "getKey"}, cb)
},
}
window.eth._callbacks = {}