From f1da6f0564696f4fb5a6c04d1b9e24ed12432d63 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 May 2014 13:35:12 +0200 Subject: [PATCH] Fixed samplecoin --- ethereal/assets/ethereum.js | 5 ++-- ethereal/assets/qml/webapp.qml | 1 + ethereal/assets/samplecoin/samplecoin.html | 28 ++++++++++++---------- utils/ethereum.go | 27 +++++++++++---------- utils/types.go | 10 +++++++- 5 files changed, 42 insertions(+), 29 deletions(-) diff --git a/ethereal/assets/ethereum.js b/ethereal/assets/ethereum.js index 1f36f691e2..64a7ff47c1 100644 --- a/ethereal/assets/ethereum.js +++ b/ethereal/assets/ethereum.js @@ -19,8 +19,7 @@ window.eth = { // Create transaction // - // Creates a transaction with the current account - // If no recipient is set, the Ethereum API will see it as a contract creation + // Transact between two state objects transact: function(sec, recipient, value, gas, gasPrice, data, cb) { postData({call: "transact", args: [sec, recipient, value, gas, gasPrice, data]}, cb); }, @@ -202,7 +201,7 @@ String.prototype.unbin = function() { String.prototype.hex2bin = function() { bytes = [] - for(var i=2; i< this.length-1; i+=2){ + for(var i=2; i< this.length-1; i+=2) { bytes.push(parseInt(this.substr(i, 2), 16)); } diff --git a/ethereal/assets/qml/webapp.qml b/ethereal/assets/qml/webapp.qml index 11ccd6998a..4bac12ef08 100644 --- a/ethereal/assets/qml/webapp.qml +++ b/ethereal/assets/qml/webapp.qml @@ -60,6 +60,7 @@ ApplicationWindow { 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": postData(data._seed, null) diff --git a/ethereal/assets/samplecoin/samplecoin.html b/ethereal/assets/samplecoin/samplecoin.html index 0f61c613a8..6f35a1312a 100644 --- a/ethereal/assets/samplecoin/samplecoin.html +++ b/ethereal/assets/samplecoin/samplecoin.html @@ -9,13 +9,14 @@