@@ -332,12 +332,12 @@ export const generateErc721Order = (
332332 orderData : Partial < OrderStructOptionsCommon > & OrderStructOptionsCommonStrict
333333) : ERC721OrderStructSerialized => {
334334 const erc721Order : ERC721OrderStructSerialized = {
335- erc721Token : nft . tokenAddress ,
335+ erc721Token : nft . tokenAddress . toLowerCase ( ) ,
336336 erc721TokenId : nft . tokenId ,
337337 direction : parseInt ( orderData . direction . toString ( ) ) , // KLUDGE(johnrjj) - There's some footgun here when only doing orderData.direction.toString(), need to parseInt it
338- erc20Token : erc20 . tokenAddress ,
338+ erc20Token : erc20 . tokenAddress . toLowerCase ( ) ,
339339 erc20TokenAmount : erc20 . amount ,
340- maker : orderData . maker ,
340+ maker : orderData . maker . toLowerCase ( ) ,
341341 // Defaults not required...
342342 erc721TokenProperties :
343343 orderData . tokenProperties ?. map ( ( property ) => ( {
@@ -348,15 +348,15 @@ export const generateErc721Order = (
348348 orderData . fees ?. map ( ( x ) => {
349349 return {
350350 amount : x . amount . toString ( ) ,
351- recipient : x . recipient ,
351+ recipient : x . recipient . toLowerCase ( ) ,
352352 feeData : x . feeData ?. toString ( ) ?? '0x' ,
353353 } ;
354354 } ) ?? [ ] ,
355355 expiry : orderData . expiry
356356 ? getUnixTime ( orderData . expiry ) . toString ( )
357357 : INFINITE_TIMESTAMP_SEC . toString ( ) ,
358358 nonce : orderData . nonce ?. toString ( ) ?? generateRandomNonce ( ) ,
359- taker : orderData . taker ?? NULL_ADDRESS ,
359+ taker : orderData . taker ?. toLowerCase ( ) ?? NULL_ADDRESS ,
360360 } ;
361361
362362 return erc721Order ;
@@ -368,13 +368,13 @@ export const generateErc1155Order = (
368368 orderData : Partial < OrderStructOptionsCommon > & OrderStructOptionsCommonStrict
369369) : ERC1155OrderStructSerialized => {
370370 const erc1155Order : ERC1155OrderStructSerialized = {
371- erc1155Token : nft . tokenAddress ,
371+ erc1155Token : nft . tokenAddress . toLowerCase ( ) ,
372372 erc1155TokenId : nft . tokenId ,
373373 erc1155TokenAmount : nft . amount ?? '1' ,
374374 direction : parseInt ( orderData . direction . toString ( ) ) , // KLUDGE(johnrjj) - There's some footgun here when only doing orderData.direction.toString(), need to parseInt it
375- erc20Token : erc20 . tokenAddress ,
375+ erc20Token : erc20 . tokenAddress . toLowerCase ( ) ,
376376 erc20TokenAmount : erc20 . amount ,
377- maker : orderData . maker ,
377+ maker : orderData . maker . toLowerCase ( ) ,
378378 // Defaults not required...
379379 erc1155TokenProperties :
380380 orderData . tokenProperties ?. map ( ( property ) => ( {
@@ -385,15 +385,15 @@ export const generateErc1155Order = (
385385 orderData . fees ?. map ( ( fee ) => {
386386 return {
387387 amount : fee . amount . toString ( ) ,
388- recipient : fee . recipient ,
388+ recipient : fee . recipient . toLowerCase ( ) ,
389389 feeData : fee . feeData ?. toString ( ) ?? '0x' ,
390390 } ;
391391 } ) ?? [ ] ,
392392 expiry : orderData . expiry
393393 ? getUnixTime ( orderData . expiry ) . toString ( )
394394 : INFINITE_TIMESTAMP_SEC . toString ( ) ,
395395 nonce : orderData . nonce ?. toString ( ) ?? generateRandomNonce ( ) ,
396- taker : orderData . taker ?? NULL_ADDRESS ,
396+ taker : orderData . taker ?. toLowerCase ( ) ?? NULL_ADDRESS ,
397397 } ;
398398
399399 return erc1155Order ;
0 commit comments