Skip to content

Commit

Permalink
fix checkout sdk test
Browse files Browse the repository at this point in the history
  • Loading branch information
zaidarain1 committed Dec 9, 2024
1 parent b013272 commit 4694012
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/checkout/sdk/src/smartCheckout/allowance/erc721.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ export const getERC721ApprovedAddress = async (

export const convertIdToNumber = (id: string, contractAddress: string): bigint => {
try {
if (!id.trim()) {
throw new CheckoutError(
'Invalid ERC721 ID',
CheckoutErrorType.GET_ERC721_ALLOWANCE_ERROR,
{ id, contractAddress },
);
}
return BigInt(id);
} catch (err: any) {
throw new CheckoutError(
Expand Down

0 comments on commit 4694012

Please sign in to comment.