@@ -304,7 +304,7 @@ export async function executeSeaportBuyWithCredit(
304304 nftId : number ,
305305 maker : SignerWithAddress ,
306306 taker : SignerWithAddress ,
307- _sellOrderStartAmount = 1
307+ isCollateralSwap = false
308308) {
309309 // approve
310310 await waitForTx (
@@ -316,13 +316,7 @@ export async function executeSeaportBuyWithCredit(
316316 const seaport = await getSeaport ( ) ;
317317 const getSellOrder = async ( ) : Promise < AdvancedOrder > => {
318318 const offers = [
319- getOfferOrConsiderationItem (
320- 2 ,
321- tokenToBuy . address ,
322- nftId ,
323- _sellOrderStartAmount ,
324- _sellOrderStartAmount
325- ) ,
319+ getOfferOrConsiderationItem ( 2 , tokenToBuy . address , nftId , 1 , 1 ) ,
326320 ] ;
327321
328322 const considerations = [
@@ -332,7 +326,7 @@ export async function executeSeaportBuyWithCredit(
332326 nftId ,
333327 startAmount ,
334328 endAmount ,
335- maker . address
329+ isCollateralSwap ? pool . address : maker . address
336330 ) ,
337331 ] ;
338332
@@ -382,7 +376,8 @@ export async function executeAcceptBidWithCredit(
382376 payLaterAmount : BigNumberish ,
383377 nftId : number ,
384378 maker : SignerWithAddress ,
385- taker : SignerWithAddress
379+ taker : SignerWithAddress ,
380+ isCollateralSwap = false
386381) {
387382 const pool = await getPoolProxy ( ) ;
388383 const seaport = await getSeaport ( ) ;
@@ -451,7 +446,7 @@ export async function executeAcceptBidWithCredit(
451446 toBN ( 0 ) ,
452447 startAmount ,
453448 endAmount ,
454- taker . address
449+ isCollateralSwap ? pool . address : taker . address
455450 ) ,
456451 ] ;
457452
0 commit comments