Skip to content

Commit

Permalink
Updated properties
Browse files Browse the repository at this point in the history
  • Loading branch information
obscuren committed Oct 20, 2014
1 parent ac7994d commit eef4cd1
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,16 +321,6 @@

var eth = web3.eth;
// 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", {
get: function() {
return "10000000000000"
Expand All @@ -340,7 +330,7 @@
Object.defineProperty(eth, "coinbase", {
get: function() {
return new Promise(function(resolve, reject) {
web3.provider.send({call: "getCoinBase"}, function(coinbase) {
web3.provider.send({call: "coinbase"}, function(coinbase) {
resolve(coinbase);
});
});
Expand All @@ -350,7 +340,7 @@
Object.defineProperty(eth, "listening", {
get: function() {
return new Promise(function(resolve, reject) {
web3.provider.send({call: "getIsListening"}, function(listening) {
web3.provider.send({call: "listening"}, function(listening) {
resolve(listening);
});
});
Expand All @@ -361,7 +351,7 @@
Object.defineProperty(eth, "mining", {
get: function() {
return new Promise(function(resolve, reject) {
web3.provider.send({call: "getIsMining"}, function(mining) {
web3.provider.send({call: "mining"}, function(mining) {
resolve(mining);
});
});
Expand All @@ -371,7 +361,7 @@
Object.defineProperty(eth, "peerCount", {
get: function() {
return new Promise(function(resolve, reject) {
web3.provider.send({call: "getPeerCount"}, function(peerCount) {
web3.provider.send({call: "peerCount"}, function(peerCount) {
resolve(peerCount);
});
});
Expand Down

0 comments on commit eef4cd1

Please sign in to comment.