Skip to content

Commit

Permalink
chore(qf): compiler checks for name and output
Browse files Browse the repository at this point in the history
  • Loading branch information
mguleryuz committed Dec 17, 2024
1 parent 17fcce1 commit 515ab77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tools/compile/extendAbi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ function extend(
): AbiParameter | ExtendedAbiParameter {
const { descriptions, tags: sotTags } = abiMemberMeta

// 0- Check if the parameter has a name else return the parameter unchanged
if (!parameter.name) return parameter
// 0- Check if the parameter is defined and has a name else return the parameter unchanged
if (!parameter || !parameter.name) return parameter

const name = parameter.name

Expand Down
5 changes: 4 additions & 1 deletion tools/compile/updateAbiOutputNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export default function (abi: Abi, abiMemberMetas: AbiMemberMetas) {
// 7- Update the outputs of the member with the nameWithIndexArr
const updatedOutputs = nameWithIndexArr.map(({ index, name }) => {
const output = (abi[memberIndex] as any)?.outputs[index]
output.name = name

if (output) {
output.name = name
}
return output
})

Expand Down

0 comments on commit 515ab77

Please sign in to comment.