Skip to content

Commit

Permalink
🚸 Throw error if not enough nft to send
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Jan 22, 2024
1 parent 193ccaa commit 3055dfa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/cosmos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ export async function sendNFTsToAPIWallet (
const nftIds = nfts.map(nft => nft.id).slice(0, nftCount)
const classIds = nftIds.map(_ => classId)

if (nftIds.length !== nftCount) {
throw new Error('Not enough NFTs')
}

const { transactionHash, code } = await signSendNFTs(
LIKER_NFT_TARGET_ADDRESS,
classIds,
Expand Down

0 comments on commit 3055dfa

Please sign in to comment.