Skip to content

Commit

Permalink
chore: normalise contract filename for storage diagrams to help find …
Browse files Browse the repository at this point in the history
…the correct Solidity file
  • Loading branch information
naddison36 committed Aug 14, 2022
1 parent 055e09f commit dac62a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/converterClasses2Storage.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/ts/converterAST2Classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,14 @@ export function convertAST2UmlClasses(
}
})
: [],
})
}
debug(
`Added Etherscan import ${newImport.absolutePath} with class names: ${newImport.classNames}`
)
imports.push(newImport)
}
}
// TODO add file level constants
})
} else {
throw new Error(`AST node not of type SourceUnit`)
Expand Down
2 changes: 1 addition & 1 deletion src/ts/converterClasses2Storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const convertClasses2Storages = (
}
return (
name === contractName &&
(relativePath == contractFilename ||
(relativePath == path.normalize(contractFilename) ||
path.basename(relativePath) ===
path.normalize(contractFilename))
)
Expand Down

0 comments on commit dac62a9

Please sign in to comment.