File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
packages/thirdweb/src/extensions/erc721/drops/write Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -59,17 +59,15 @@ export function claimToBatch(
5959async function getClaimToBatchParams (
6060 options : BaseTransactionOptions < ClaimToBatchParams > ,
6161) {
62- const errorIndexTo = options . content . findIndex ( ( o ) => ! o . to ) ;
63- if ( errorIndexTo !== - 1 ) {
64- throw new Error (
65- `Error: Item at index ${ errorIndexTo } is missing recipient address ("to")` ,
66- ) ;
67- }
68- const errorIndexQuantity = options . content . findIndex ( ( o ) => ! o . quantity ) ;
69- if ( errorIndexQuantity !== - 1 ) {
70- throw new Error (
71- `Error: Item at index ${ errorIndexQuantity } is missing claim quantity` ,
72- ) ;
62+ for ( let i = 0 ; i < options . content . length ; i ++ ) {
63+ if ( ! options . content [ i ] ?. quantity ) {
64+ throw new Error ( `Error: Item at index ${ i } is missing claim quantity` ) ;
65+ }
66+ if ( ! options . content [ i ] ?. to ) {
67+ throw new Error (
68+ `Error: Item at index ${ i } is missing recipient address ("to")` ,
69+ ) ;
70+ }
7371 }
7472 const content = optimizeClaimContent ( options . content ) ;
7573 const data = await Promise . all (
@@ -89,6 +87,7 @@ async function getClaimToBatchParams(
8987 pricePerToken : claimParams . pricePerToken ,
9088 allowlistProof : claimParams . allowlistProof ,
9189 data : claimParams . data ,
90+ overrides : claimParams . overrides ,
9291 } ) ;
9392 } ) ,
9493 ) ;
You can’t perform that action at this time.
0 commit comments