Commit 953c34e7f7eb6e1ff41fa8f1cd161a1f62909b34
Interface: change internal getBalance to work with U256 and not ArrayBuffer
Alex Beregszaszi committed on 8/17/2016, 12:53:57 AMParent: de2486f29ec9def6a646f6caeaf4ab72cf4f7fdb
Files changed
interface.js | changed |
interface.js | ||
---|---|---|
@@ -94,9 +94,9 @@ | ||
94 | 94 | balance (addressOffset, offset) { |
95 | 95 | const address = new Address(this.getMemory(addressOffset, constants.ADDRESS_SIZE_BYTES)) |
96 | 96 | // call the parent contract and ask for the balance of one of its child contracts |
97 | 97 | const balance = this.environment.parent.environment.getBalance(address) |
98 | - this.setMemory(offset, constants.BALANCE_SIZE_BYTES, balance) | |
98 | + this.setMemory(offset, constants.BALANCE_SIZE_BYTES, balance.toBuffer(constants.BALANCE_SIZE_BYTES)) | |
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
102 | 102 | * Gets the execution's origination address and loads it into memory at the |
Built with git-ssb-web