aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-doc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-doc')
-rw-r--r--packages/sol-doc/src/solidity_doc_generator.ts12
1 files changed, 5 insertions, 7 deletions
diff --git a/packages/sol-doc/src/solidity_doc_generator.ts b/packages/sol-doc/src/solidity_doc_generator.ts
index 6c67f921d..78c56e7fa 100644
--- a/packages/sol-doc/src/solidity_doc_generator.ts
+++ b/packages/sol-doc/src/solidity_doc_generator.ts
@@ -231,8 +231,6 @@ function _genMethodParamsDoc(
devdocIfExists: DevdocOutput | undefined,
): { parameters: Parameter[]; methodSignature: string } {
const parameters: Parameter[] = [];
- let methodSignature = `${name}(`;
-
for (const abiParam of abiParams) {
const parameter: Parameter = {
name: abiParam.name,
@@ -241,13 +239,13 @@ function _genMethodParamsDoc(
type: { name: abiParam.type, typeDocType: TypeDocTypes.Intrinsic },
};
parameters.push(parameter);
- methodSignature = `${methodSignature}${abiParam.type},`;
}
- if (methodSignature.slice(-1) === ',') {
- methodSignature = methodSignature.slice(0, -1);
- }
- methodSignature += ')';
+ const methodSignature = `${name}(${abiParams
+ .map(abiParam => {
+ return abiParam.type;
+ })
+ .join(',')})`;
if (!_.isUndefined(devdocIfExists)) {
const devdocMethodIfExists = devdocIfExists.methods[methodSignature];