Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
Fix for extracting user comments from functions (#514)
Browse files Browse the repository at this point in the history
* Extract user comments from functions

* v2.3.26-1
  • Loading branch information
joaquim-verges committed Jul 12, 2022
1 parent 145486c commit e10b668
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/sdk",
"version": "2.3.26-0",
"version": "2.3.26-1",
"description": "The main thirdweb SDK.",
"repository": {
"type": "git",
Expand Down
10 changes: 5 additions & 5 deletions src/common/feature-detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ export function extractFunctionsFromAbi(
const parsed: AbiFunction[] = [];
for (const f of functions) {
const doc =
metadata?.output?.userdoc[
Object.keys(metadata?.output?.userdoc.methods || {}).find(
(fn) => fn.substring(0, fn.indexOf("(")) === f.name,
metadata?.output?.userdoc.methods[
Object.keys(metadata?.output?.userdoc.methods || {}).find((fn) =>
fn.includes(f.name || "unknown"),
) || ""
]?.notice ||
metadata?.output?.devdoc.methods[
Object.keys(metadata?.output?.devdoc.methods || {}).find(
(fn) => fn.substring(0, fn.indexOf("(")) === f.name,
Object.keys(metadata?.output?.devdoc.methods || {}).find((fn) =>
fn.includes(f.name || "unknown"),
) || ""
]?.details;

Expand Down

0 comments on commit e10b668

Please sign in to comment.