@@ -352,7 +352,7 @@ public async Task<TransactionResult> UpdateListing(string listingId, DirectListi
352352 TokenId = BigInteger . Parse ( listing . tokenId ?? oldListing . tokenId ) ,
353353 Quantity = BigInteger . Parse ( listing . quantity ?? oldListing . quantity ) ,
354354 Currency = listing . currencyContractAddress ?? oldListing . currencyContractAddress ,
355- PricePerToken = BigInteger . Parse ( listing . pricePerToken ?? oldListing . pricePerToken ) ,
355+ PricePerToken = BigInteger . Parse ( listing . pricePerToken . ToWei ( ) ?? oldListing . pricePerToken ) ,
356356 StartTimestamp = ( BigInteger ) ( listing . startTimeInSeconds ?? oldListing . startTimeInSeconds ) ,
357357 EndTimestamp = ( BigInteger ) ( listing . endTimeInSeconds ?? oldListing . endTimeInSeconds ) ,
358358 Reserved = listing . isReservedListing ?? oldListing . isReservedListing ?? false ,
@@ -368,7 +368,7 @@ public class EnglishAuctions : Routable
368368 private string contractAddress ;
369369
370370 public EnglishAuctions ( string parentRoute , string contractAddress )
371- : base ( Routable . append ( parentRoute , "auctions " ) )
371+ : base ( Routable . append ( parentRoute , "englishAuctions " ) )
372372 {
373373 this . contractAddress = contractAddress ;
374374 }
@@ -477,24 +477,24 @@ public async Task<Auction> GetAuction(string auctionId)
477477 tokenId = result . Auction . TokenId . ToString ( ) ,
478478 quantity = result . Auction . Quantity . ToString ( ) ,
479479 currencyContractAddress = result . Auction . Currency ,
480- minimumBidAmount = null ,
480+ minimumBidAmount = result . Auction . MinimumBidAmount . ToString ( ) ,
481481 minimumBidCurrencyValue = new CurrencyValue (
482482 currency . name ,
483483 currency . symbol ,
484484 currency . decimals ,
485485 result . Auction . MinimumBidAmount . ToString ( ) ,
486486 result . Auction . MinimumBidAmount . ToString ( ) . ToEth ( )
487487 ) ,
488- buyoutBidAmount = null ,
488+ buyoutBidAmount = result . Auction . BuyoutBidAmount . ToString ( ) ,
489489 buyoutCurrencyValue = new CurrencyValue (
490490 currency . name ,
491491 currency . symbol ,
492492 currency . decimals ,
493493 result . Auction . BuyoutBidAmount . ToString ( ) ,
494494 result . Auction . BuyoutBidAmount . ToString ( ) . ToEth ( )
495495 ) ,
496- timeBufferInSeconds = null ,
497- bidBufferBps = null ,
496+ timeBufferInSeconds = ( int ) result . Auction . TimeBufferInSeconds ,
497+ bidBufferBps = ( int ) result . Auction . BidBufferBps ,
498498 startTimeInSeconds = ( long ) result . Auction . StartTimestamp ,
499499 endTimeInSeconds = ( long ) result . Auction . EndTimestamp ,
500500 asset = metadata ,
@@ -680,8 +680,8 @@ public async Task<TransactionResult> CreateAuction(CreateAuctionInput input)
680680 TokenId = BigInteger . Parse ( input . tokenId ) ,
681681 Quantity = BigInteger . Parse ( input . quantity ?? "1" ) ,
682682 Currency = input . currencyContractAddress ?? Utils . NativeTokenAddressV2 ,
683- MinimumBidAmount = BigInteger . Parse ( input . minimumBidAmount ) ,
684- BuyoutBidAmount = BigInteger . Parse ( input . buyoutBidAmount ) ,
683+ MinimumBidAmount = BigInteger . Parse ( input . minimumBidAmount . ToWei ( ) ) ,
684+ BuyoutBidAmount = BigInteger . Parse ( input . buyoutBidAmount . ToWei ( ) ) ,
685685 TimeBufferInSeconds = ulong . Parse ( input . timeBufferInSeconds ?? "900" ) ,
686686 BidBufferBps = ulong . Parse ( input . bidBufferBps ?? "500" ) ,
687687 StartTimestamp = ( ulong ) ( input . startTimestamp ?? await Utils . GetCurrentBlockTimeStamp ( ) + 60 ) ,
@@ -716,8 +716,8 @@ public async Task<TransactionResult> MakeBid(string auctionId, string bidAmount)
716716 {
717717 return await TransactionManager . ThirdwebWrite (
718718 contractAddress ,
719- new EnglishAuctionsContract . BidInAuctionFunction ( ) { AuctionId = BigInteger . Parse ( auctionId ) , BidAmount = BigInteger . Parse ( bidAmount ) } ,
720- BigInteger . Parse ( bidAmount )
719+ new EnglishAuctionsContract . BidInAuctionFunction ( ) { AuctionId = BigInteger . Parse ( auctionId ) , BidAmount = BigInteger . Parse ( bidAmount . ToWei ( ) ) } ,
720+ BigInteger . Parse ( bidAmount . ToWei ( ) )
721721 ) ;
722722 }
723723 }
@@ -905,12 +905,11 @@ public async Task<TransactionResult> MakeOffer(MakeOfferInput input)
905905 AssetContract = input . assetContractAddress ,
906906 TokenId = BigInteger . Parse ( input . tokenId ) ,
907907 Quantity = BigInteger . Parse ( input . quantity ?? "1" ) ,
908- Currency = input . currencyContractAddress ?? Utils . NativeTokenAddressV2 ,
909- TotalPrice = BigInteger . Parse ( input . totalPrice ) ,
908+ Currency = input . currencyContractAddress ?? Utils . GetNativeTokenWrapper ( ThirdwebManager . Instance . SDK . nativeSession . lastChainId ) ,
909+ TotalPrice = BigInteger . Parse ( input . totalPrice . ToWei ( ) ) ,
910910 ExpirationTimestamp = ( BigInteger ) ( input . endTimestamp ?? Utils . GetUnixTimeStampIn10Years ( ) )
911911 }
912- } ,
913- BigInteger . Parse ( input . totalPrice )
912+ }
914913 ) ;
915914 }
916915 }
0 commit comments