From 85f0f646ca518f2e5dd1a0a65522719743739775 Mon Sep 17 00:00:00 2001 From: Mayukha Vadari Date: Mon, 18 Nov 2024 18:29:09 -0500 Subject: [PATCH] clean up --- packages/xrpl/tools/generateModels.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/xrpl/tools/generateModels.js b/packages/xrpl/tools/generateModels.js index 3bf12d7fdb..550f40b48e 100644 --- a/packages/xrpl/tools/generateModels.js +++ b/packages/xrpl/tools/generateModels.js @@ -15,7 +15,7 @@ let jsTransactionFile function processRippledSource(folder) { const sfieldMacroFile = readFile( - path.join(process.argv[2], '/include/xrpl/protocol/detail/sfields.macro'), + path.join(folder, '/include/xrpl/protocol/detail/sfields.macro'), ) const sfieldHits = sfieldMacroFile.matchAll( /^ *[A-Z]*TYPED_SFIELD *\( *sf([^,\n]*),[ \n]*([^, \n]+)[ \n]*,[ \n]*([0-9]+)(,.*?(notSigning))?/gm, @@ -162,7 +162,7 @@ export { ${tx} } from './${tx}'`, function generateParamLine(sfields, param, isRequired) { const paramName = param.slice(2) - const paramType = sfields[paramName] + const paramType = sfields[paramName] ?? 'any' const paramTypeOutput = typeMap[paramType] return ` ${paramName}${isRequired ? '' : '?'}: ${paramTypeOutput}\n` }