Skip to content

Commit

Permalink
feat: add first implementation of LSP checker page (#109)
Browse files Browse the repository at this point in the history
* feat: create LSP Checker page for Universal Profile

* refactor: fix data fetching for keyType Array

* chore: fix eslint error

* build: upgrade erc725.js to latest
  • Loading branch information
CJ42 authored May 29, 2024
1 parent dabdd44 commit 733bf07
Show file tree
Hide file tree
Showing 7 changed files with 10,049 additions and 5,953 deletions.
2 changes: 1 addition & 1 deletion components/DataKeysTable/DataKeysTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const DataKeysTable: React.FC<Props> = ({
dataResult.push({
key: dataKeys[i],
value: result[i],
schema: schemaToLoad[i] as ERC725JSONSchema,
schema: schemaToLoad[i],
});
});
}
Expand Down
9 changes: 9 additions & 0 deletions components/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ const NavBar: React.FC = () => {
🔎 Inspector
</a>
</Link>
<Link href="/lsp-checker">
<a
className={`navbar-item ${
router.pathname === '/lsp-checker' && 'has-text-link'
}`}
>
✅ LSP Checker
</a>
</Link>
<Link href="/data-fetcher">
<a
className={`navbar-item ${
Expand Down
9 changes: 6 additions & 3 deletions components/ValueTypeDecoder/ValueTypeDecoder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ const ValueTypeDecoder: React.FC<Props> = ({
}
};
startDecoding();
}, [address, web3]);
}, [address, web3, erc725JSONSchema, value]);

try {
if (
typeof decodedDataOneKey[0].value === 'string' ||
typeof decodedDataOneKey[0].value === 'number'
decodedDataOneKey[0].name.endsWith('[]') &&
(typeof decodedDataOneKey[0].value === 'string' ||
typeof decodedDataOneKey[0].value === 'number')
) {
let badgeContent = decodedDataOneKey[0].value;

Expand Down Expand Up @@ -96,6 +97,8 @@ const ValueTypeDecoder: React.FC<Props> = ({
);
}

console.log('decodedDataArray', decodedDataArray);

if (
decodedDataArray !== undefined &&
Array.isArray(decodedDataArray.value) &&
Expand Down
Loading

0 comments on commit 733bf07

Please sign in to comment.