Browse Source

Implemented TX History for ethjs

Maran 11 years ago
parent
commit
9654b80912
2 changed files with 9 additions and 0 deletions
  1. 3 0
      ethereal/assets/ext/ethereum.js
  2. 6 0
      ethereal/assets/qml/webapp.qml

+ 3 - 0
ethereal/assets/ext/ethereum.js

@@ -58,6 +58,9 @@ window.eth = {
 	getBalanceAt: function(address, cb) {
 		postData({call: "getBalance", args: [address]}, cb);
 	},
+	getTransactionsFor: function(address, cb) {
+		postData({call: "getTransactionsFor", args: [address]}, cb);
+	},
 
 	getSecretToAddress: function(sec, cb) {
 		postData({call: "getSecretToAddress", args: [sec]}, cb);

+ 6 - 0
ethereal/assets/qml/webapp.qml

@@ -103,6 +103,12 @@ ApplicationWindow {
 					      postData(data._seed,stateObject)
 
 						break
+					case "getTransactionsFor":
+					      require(1);
+					      var txs = eth.getTransactionsFor(data.args[0], true)
+					      postData(data._seed, txs)
+
+					      break
 					case "getBalance":
 						require(1);