diff --git a/src/solidity/types/DynamicByteArray.js b/src/solidity/types/DynamicByteArray.js index 2de703f46d..6a6f52c164 100644 --- a/src/solidity/types/DynamicByteArray.js +++ b/src/solidity/types/DynamicByteArray.js @@ -10,8 +10,10 @@ function DynamicByteArray () { DynamicByteArray.prototype.decodeFromStorage = function (location, storageContent) { var value = util.extractHexByte(location, storageContent, this.storageBytes) - var key = util.sha3(location.slot) - if (storageContent[key] && storageContent[key] !== '0x') { + var bn = new BN(value.substr(62, 2), 16) + bn = bn.toString(2) + if (bn[bn.length - 1] === '1') { + var key = util.sha3(location.slot) var ret = '' var currentSlot = storageContent[key] key = new BN(key.replace('0x', ''), 16)