Skip to content

Commit

Permalink
Added test cases to FunctionCallAnalyzer.spec.ts (and fixed some late…
Browse files Browse the repository at this point in the history
…nt issues).

Signed-off-by: Eric Le Ponner <[email protected]>
  • Loading branch information
ericleponner committed Jan 5, 2024
1 parent f9b88c6 commit e073bc6
Show file tree
Hide file tree
Showing 2 changed files with 291 additions and 3 deletions.
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.input.value
const input = this.normalizedInput.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.output.value
const output = this.normalizedOutput.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.error.value
const error = this.normalizedError.value
if (i !== null && error !== null && error !== "0x") {
try {
const ed = i.parseError(error)
Expand Down
Loading

0 comments on commit e073bc6

Please sign in to comment.