Commit d40898a1c0e4f37c6b28da6da6646db86398ebcb
Transaction: parse Address properly
Alex Beregszaszi committed on 8/24/2016, 2:24:49 AMParent: f879199c3cfb67185d4d4ae91f4ff03a55d831ba
Files changed
transaction.js | changed |
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(this._tx.getSenderAddress()) | |
40 | + return new Address('0x' + this._tx.getSenderAddress().toString('hex')) | |
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(this._tx.to) | |
47 | + return new Address('0x' + this._tx.to.toString('hex')) | |
48 | 48 | } |
49 | 49 | |
50 | 50 | get isSend () { |
51 | 51 | } |
Built with git-ssb-web