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 Apr 25, 2024
1 parent 5af2f58 commit b926597
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lib/encoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ import { ERC725JSONSchemaValueType } from '../types/ERC725JSONSchema';
const abiCoder = AbiCoder;

const uintNValueTypeRegex = /^uint(\d+)$/;
``;
const bytesNValueTypeRegex = /^bytes(\d+)$/;
``;
const BytesNValueContentRegex = /Bytes(\d+)/;

export const encodeDataSourceWithHash = (
Expand Down Expand Up @@ -211,7 +209,7 @@ const encodeToBytesN = (
bytesN: BytesNValueTypes,
value: string | number,
): string => {
const numberOfBytesInType = parseInt(bytesN.split('bytes')[1], 10);
const numberOfBytesInType = Number.parseInt(bytesN.split('bytes')[1], 10);

let valueToEncode: string;

Expand Down Expand Up @@ -985,7 +983,7 @@ export function decodeValueContent(
value: string,
): string | URLDataWithHash | number | boolean | null {
if (isValueContentLiteralHex(valueContent)) {
if (valueContent.toLowerCase() != value) {
if (valueContent.toLowerCase() !== value) {
throw new Error(
`Could not decode value content: the value ${value} does not match the Hex Literal ${valueContent} defined in the \`valueContent\` part of the schema`,
);
Expand Down

0 comments on commit b926597

Please sign in to comment.