Commit eef4cd1b authored by obscuren's avatar obscuren

Updated properties

parent ac7994d8
...@@ -321,16 +321,6 @@ ...@@ -321,16 +321,6 @@
var eth = web3.eth; var eth = web3.eth;
// Eth object properties // Eth object properties
Object.defineProperty(eth, "key", {
get: function() {
return new Promise(function(resolve, reject) {
eth.provider.send({call: "getKey"}, function(k) {
resolve(k);
});
});
},
});
Object.defineProperty(eth, "gasPrice", { Object.defineProperty(eth, "gasPrice", {
get: function() { get: function() {
return "10000000000000" return "10000000000000"
...@@ -340,7 +330,7 @@ ...@@ -340,7 +330,7 @@
Object.defineProperty(eth, "coinbase", { Object.defineProperty(eth, "coinbase", {
get: function() { get: function() {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
web3.provider.send({call: "getCoinBase"}, function(coinbase) { web3.provider.send({call: "coinbase"}, function(coinbase) {
resolve(coinbase); resolve(coinbase);
}); });
}); });
...@@ -350,7 +340,7 @@ ...@@ -350,7 +340,7 @@
Object.defineProperty(eth, "listening", { Object.defineProperty(eth, "listening", {
get: function() { get: function() {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
web3.provider.send({call: "getIsListening"}, function(listening) { web3.provider.send({call: "listening"}, function(listening) {
resolve(listening); resolve(listening);
}); });
}); });
...@@ -361,7 +351,7 @@ ...@@ -361,7 +351,7 @@
Object.defineProperty(eth, "mining", { Object.defineProperty(eth, "mining", {
get: function() { get: function() {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
web3.provider.send({call: "getIsMining"}, function(mining) { web3.provider.send({call: "mining"}, function(mining) {
resolve(mining); resolve(mining);
}); });
}); });
...@@ -371,7 +361,7 @@ ...@@ -371,7 +361,7 @@
Object.defineProperty(eth, "peerCount", { Object.defineProperty(eth, "peerCount", {
get: function() { get: function() {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
web3.provider.send({call: "getPeerCount"}, function(peerCount) { web3.provider.send({call: "peerCount"}, function(peerCount) {
resolve(peerCount); resolve(peerCount);
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment