Skip to content

Commit

Permalink
chore: fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 committed May 17, 2024
1 parent a36f694 commit 5445222
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/encodeKeyName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export function encodeKeyName(name: string, dynamicKeyParts?: DynamicKeyParts) {
}
case 'Array': // Warning: this can not correctly encode subsequent keys of array, only the initial Array key will work
// encode for array index
if (dynamicKeyParts && typeof dynamicKeyParts == 'number') {
if (dynamicKeyParts && typeof dynamicKeyParts === 'number') {
return encodeArrayKey(keccak256(name), dynamicKeyParts);
}

Expand Down
5 changes: 2 additions & 3 deletions src/lib/schemaParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,8 @@ const findMappingWithGroupingSchemaForKey = (
const dynamicKeyPart = key.substring(26);

if (isDynamicKeyName(keySchema.name)) {
(
keySchema as DynamicNameSchema
).dynamicName = `${keyNameParts[0]}:${keyNameParts[1]}:0x${dynamicKeyPart}`;
(keySchema as DynamicNameSchema).dynamicName =
`${keyNameParts[0]}:${keyNameParts[1]}:0x${dynamicKeyPart}`;
(keySchema as DynamicNameSchema).dynamicKeyPart = `0x${dynamicKeyPart}`;
}

Expand Down

0 comments on commit 5445222

Please sign in to comment.