Commit ba8942733776fbc730e385e2758b1c9424000c4a
Transaction/Block: address magic is not needed anymore
Alex Beregszaszi committed on 8/25/2016, 2:35:34 AMParent: a2d4372bc21bc705e7d5c559b431d90588315e10
Files changed
block.js | changed |
transaction.js | changed |
block.js | ||
---|---|---|
@@ -25,7 +25,7 @@ | ||
25 | 25 | return ethUtil.bufferToInt(this.header.timestamp) |
26 | 26 | } |
27 | 27 | |
28 | 28 | get coinbase () { |
29 | - return new Address('0x' + this.header.coinbase.toString('hex')) | |
29 | + return new Address(this.header.coinbase) | |
30 | 30 | } |
31 | 31 | } |
transaction.js | ||
---|---|---|
@@ -36,16 +36,16 @@ | ||
36 | 36 | return Uint8Array.from(this._tx.data) |
37 | 37 | } |
38 | 38 | |
39 | 39 | get from () { |
40 | - return new Address('0x' + this._tx.getSenderAddress().toString('hex')) | |
40 | + return new Address(this._tx.getSenderAddress()) | |
41 | 41 | } |
42 | 42 | |
43 | 43 | get to () { |
44 | 44 | if (this._tx.to.length === 0) { |
45 | 45 | return new Address('0x0000000000000000000000000000000000000000') |
46 | 46 | } |
47 | - return new Address('0x' + this._tx.to.toString('hex')) | |
47 | + return new Address(this._tx.to) | |
48 | 48 | } |
49 | 49 | |
50 | 50 | get isSend () { |
51 | 51 | } |
Built with git-ssb-web