fix assigning the type property

pull/3068/head
yann300 2 years ago
parent 15ddc3a8d1
commit b4bf4effb1
  1. 2
      libs/remix-debug/src/solidity-decoder/localDecoder.ts
  2. 2
      libs/remix-debug/src/solidity-decoder/types/StringType.ts

@ -21,7 +21,7 @@ export async function solidityLocals (vmtraceIndex, internalTreeCall, stack, mem
locals[name] = await variable.type.decodeFromStack(variable.stackDepth, stack, memory, storageResolver, calldata, cursor, variable) locals[name] = await variable.type.decodeFromStack(variable.stackDepth, stack, memory, storageResolver, calldata, cursor, variable)
} catch (e) { } catch (e) {
console.log(e) console.log(e)
locals[name] = { error: '<decoding failed - ' + e.message + '>' } locals[name] = { error: '<decoding failed - ' + e.message + '>', type: variable && variable.type && variable.type.typeName || 'unknown' }
} }
} }
} }

@ -25,7 +25,7 @@ export class StringType extends DynamicByteArray {
return await super.decodeFromStack(stackDepth, stack, memory, storageResolver, calldata, cursor, variableDetails) return await super.decodeFromStack(stackDepth, stack, memory, storageResolver, calldata, cursor, variableDetails)
} catch (e) { } catch (e) {
console.log(e) console.log(e)
return { error: '<decoding failed - ' + e.message + '>' } return { error: '<decoding failed - ' + e.message + '>', type: this.typeName }
} }
} }

Loading…
Cancel
Save