From f02ada2d11b5dec6bc4615cba43a932821501473 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 29 Jun 2018 11:04:06 +0300 Subject: Add a hack comment --- packages/abi-gen/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/abi-gen/src/index.ts') diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts index c49f9dfa7..47f2c404b 100644 --- a/packages/abi-gen/src/index.ts +++ b/packages/abi-gen/src/index.ts @@ -73,6 +73,8 @@ function registerPartials(partialsGlob: string): void { function writeOutputFile(name: string, renderedTsCode: string): void { let fileName = toSnakeCase(name); + // HACK: Snake case doesn't make a lot of sense for abbreviated names but we can't reliably detect abbreviations + // so we special-case the abbreviations we use. fileName = fileName.replace('z_r_x', 'zrx').replace('e_r_c', 'erc'); const filePath = `${args.output}/${fileName}.ts`; fs.writeFileSync(filePath, renderedTsCode); -- cgit