Skip to content

Commit

Permalink
fix(validity util): isBlockheight check more strict
Browse files Browse the repository at this point in the history
  • Loading branch information
Atticus committed Mar 5, 2024
1 parent 1fcb3e6 commit c3854b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/arweave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ export const validateArweaveId = (id: string): boolean => {
};

export function isBlockHeight(height: string | number): height is BlockHeight {
return height !== undefined;
return height !== undefined && !isNaN(parseInt(height.toString()))

Check failure on line 25 in src/utils/arweave.ts

View workflow job for this annotation

GitHub Actions / build (18.x, lint)

Insert `;`

Check failure on line 25 in src/utils/arweave.ts

View workflow job for this annotation

GitHub Actions / build (20.x, lint)

Insert `;`
}

0 comments on commit c3854b4

Please sign in to comment.