Merge pull request #1347 from ethereum/fixHexNormalization

Fix hex normalization
pull/1/head
yann300 7 years ago committed by GitHub
commit 00a9480906
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      src/app/debugger/remix-debugger/src/ui/StackPanel.js
  2. 2
      test-browser-debugger/test/vmdebugger.js

@ -1,7 +1,5 @@
'use strict' 'use strict'
var DropdownPanel = require('./DropdownPanel') var DropdownPanel = require('./DropdownPanel')
var remixLib = require('remix-lib')
var ui = remixLib.helpers.ui
var yo = require('yo-yo') var yo = require('yo-yo')
function StackPanel (_parent, _traceManager) { function StackPanel (_parent, _traceManager) {
@ -26,19 +24,10 @@ StackPanel.prototype.init = function () {
self.basicPanel.update({}) self.basicPanel.update({})
console.log(error) console.log(error)
} else if (self.parent.currentStepIndex === index) { } else if (self.parent.currentStepIndex === index) {
self.basicPanel.update(self.format(stack)) self.basicPanel.update(stack)
} }
}) })
}) })
} }
StackPanel.prototype.format = function (stack) {
var ret = []
stack.map(function (item, i) {
var hex = ui.normalizeHex(item)
ret.push(hex)
})
return ret
}
module.exports = StackPanel module.exports = StackPanel

@ -74,7 +74,7 @@ function panels (browser) {
.setValue('#txinput', '0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51') .setValue('#txinput', '0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51')
.click('#load') .click('#load')
.multipleClick('#intoforward', 63) .multipleClick('#intoforward', 63)
.assertStack(['0:0x', '1:0x60', '2:0x65', '3:0x38', '4:0x55', '5:0x60fe47b1']) .assertStack(['0:0x00', '1:0x60', '2:0x65', '3:0x38', '4:0x55', '5:0x60fe47b1'])
.assertStorageChanges(['0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563:Objectkey:0x00value:0x38']) .assertStorageChanges(['0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563:Objectkey:0x00value:0x38'])
.assertCallData(['0:0x60fe47b10000000000000000000000000000000000000000000000000000000000000038']) .assertCallData(['0:0x60fe47b10000000000000000000000000000000000000000000000000000000000000038'])
.assertCallStack(['0:0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5']) .assertCallStack(['0:0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5'])

Loading…
Cancel
Save