Skip to content

Commit

Permalink
Revert "fix: error decoding not working as expected on verified contr…
Browse files Browse the repository at this point in the history
…act (#833)"

This reverts commit e49b4c5.
  • Loading branch information
svienot committed Jan 8, 2024
1 parent 0caee69 commit a9c1a33
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 302 deletions.
12 changes: 1 addition & 11 deletions src/components/values/FunctionError.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,6 @@
</template>
</Property>

<template v-for="arg in errorInputs" :key="arg.name">
<Property :custom-nb-col-class="customNbColClass">
<template v-slot:name>{{ arg.name != "" ? arg.name : "message" }}</template>
<template v-slot:value>
<FunctionValue :ntv="arg"/>
</template>
</Property>
</template>

</div><template v-else>

<Property :custom-nb-col-class="customNbColClass" id="functionInput">
Expand Down Expand Up @@ -91,11 +82,10 @@ import {FunctionCallAnalyzer} from "@/utils/analyzer/FunctionCallAnalyzer";
import Property from "@/components/Property.vue";
import {decodeSolidityErrorMessage} from "@/schemas/HederaUtils";
import StringValue from "@/components/values/StringValue.vue";
import FunctionValue from "@/components/values/FunctionValue.vue";

export default defineComponent({
name: 'FunctionError',
components: {FunctionValue, StringValue, Property, HexaValue},
components: {StringValue, Property, HexaValue},
props: {
analyzer: {
type: Object as PropType<FunctionCallAnalyzer>,
Expand Down
6 changes: 3 additions & 3 deletions src/utils/analyzer/FunctionCallAnalyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export class FunctionCallAnalyzer {

private readonly updateTransactionDescription = async () => {
const i = this.contractAnalyzer.interface.value
const input = this.normalizedInput.value
const input = this.input.value
if (i !== null && input !== null) {
try {
const td = i.parseTransaction({data: input})
Expand All @@ -206,7 +206,7 @@ export class FunctionCallAnalyzer {
private readonly updateOutputResult = () => {
const td = this.transactionDescription.value
const i = this.contractAnalyzer.interface.value
const output = this.normalizedOutput.value
const output = this.output.value
if (td !== null && i !== null && output !== null) {
try {
this.outputResult.value = i.decodeFunctionResult(td.fragment as ethers.FunctionFragment, output)
Expand All @@ -223,7 +223,7 @@ export class FunctionCallAnalyzer {

private readonly updateErrorDescription = async() => {
const i = this.contractAnalyzer.interface.value
const error = this.normalizedError.value
const error = this.error.value
if (i !== null && error !== null && error !== "0x") {
try {
const ed = i.parseError(error)
Expand Down
288 changes: 0 additions & 288 deletions tests/unit/utils/analyzer/FunctionCallAnalyzer.spec.ts

Large diffs are not rendered by default.

0 comments on commit a9c1a33

Please sign in to comment.