git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit ba8942733776fbc730e385e2758b1c9424000c4a

Transaction/Block: address magic is not needed anymore

Alex Beregszaszi committed on 8/25/2016, 2:35:34 AM
Parent: a2d4372bc21bc705e7d5c559b431d90588315e10

Files changed

block.jschanged
transaction.jschanged
block.jsView
@@ -25,7 +25,7 @@
2525 return ethUtil.bufferToInt(this.header.timestamp)
2626 }
2727
2828 get coinbase () {
29- return new Address('0x' + this.header.coinbase.toString('hex'))
29+ return new Address(this.header.coinbase)
3030 }
3131 }
transaction.jsView
@@ -36,16 +36,16 @@
3636 return Uint8Array.from(this._tx.data)
3737 }
3838
3939 get from () {
40- return new Address('0x' + this._tx.getSenderAddress().toString('hex'))
40+ return new Address(this._tx.getSenderAddress())
4141 }
4242
4343 get to () {
4444 if (this._tx.to.length === 0) {
4545 return new Address('0x0000000000000000000000000000000000000000')
4646 }
47- return new Address('0x' + this._tx.to.toString('hex'))
47+ return new Address(this._tx.to)
4848 }
4949
5050 get isSend () {
5151 }

Built with git-ssb-web