@@ -352,7 +352,7 @@ public async Task<TransactionResult> UpdateListing(string listingId, DirectListi
352
352
TokenId = BigInteger . Parse ( listing . tokenId ?? oldListing . tokenId ) ,
353
353
Quantity = BigInteger . Parse ( listing . quantity ?? oldListing . quantity ) ,
354
354
Currency = listing . currencyContractAddress ?? oldListing . currencyContractAddress ,
355
- PricePerToken = BigInteger . Parse ( listing . pricePerToken ?? oldListing . pricePerToken ) ,
355
+ PricePerToken = BigInteger . Parse ( listing . pricePerToken . ToWei ( ) ?? oldListing . pricePerToken ) ,
356
356
StartTimestamp = ( BigInteger ) ( listing . startTimeInSeconds ?? oldListing . startTimeInSeconds ) ,
357
357
EndTimestamp = ( BigInteger ) ( listing . endTimeInSeconds ?? oldListing . endTimeInSeconds ) ,
358
358
Reserved = listing . isReservedListing ?? oldListing . isReservedListing ?? false ,
@@ -368,7 +368,7 @@ public class EnglishAuctions : Routable
368
368
private string contractAddress ;
369
369
370
370
public EnglishAuctions ( string parentRoute , string contractAddress )
371
- : base ( Routable . append ( parentRoute , "auctions " ) )
371
+ : base ( Routable . append ( parentRoute , "englishAuctions " ) )
372
372
{
373
373
this . contractAddress = contractAddress ;
374
374
}
@@ -477,24 +477,24 @@ public async Task<Auction> GetAuction(string auctionId)
477
477
tokenId = result . Auction . TokenId . ToString ( ) ,
478
478
quantity = result . Auction . Quantity . ToString ( ) ,
479
479
currencyContractAddress = result . Auction . Currency ,
480
- minimumBidAmount = null ,
480
+ minimumBidAmount = result . Auction . MinimumBidAmount . ToString ( ) ,
481
481
minimumBidCurrencyValue = new CurrencyValue (
482
482
currency . name ,
483
483
currency . symbol ,
484
484
currency . decimals ,
485
485
result . Auction . MinimumBidAmount . ToString ( ) ,
486
486
result . Auction . MinimumBidAmount . ToString ( ) . ToEth ( )
487
487
) ,
488
- buyoutBidAmount = null ,
488
+ buyoutBidAmount = result . Auction . BuyoutBidAmount . ToString ( ) ,
489
489
buyoutCurrencyValue = new CurrencyValue (
490
490
currency . name ,
491
491
currency . symbol ,
492
492
currency . decimals ,
493
493
result . Auction . BuyoutBidAmount . ToString ( ) ,
494
494
result . Auction . BuyoutBidAmount . ToString ( ) . ToEth ( )
495
495
) ,
496
- timeBufferInSeconds = null ,
497
- bidBufferBps = null ,
496
+ timeBufferInSeconds = ( int ) result . Auction . TimeBufferInSeconds ,
497
+ bidBufferBps = ( int ) result . Auction . BidBufferBps ,
498
498
startTimeInSeconds = ( long ) result . Auction . StartTimestamp ,
499
499
endTimeInSeconds = ( long ) result . Auction . EndTimestamp ,
500
500
asset = metadata ,
@@ -680,8 +680,8 @@ public async Task<TransactionResult> CreateAuction(CreateAuctionInput input)
680
680
TokenId = BigInteger . Parse ( input . tokenId ) ,
681
681
Quantity = BigInteger . Parse ( input . quantity ?? "1" ) ,
682
682
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 ( ) ) ,
685
685
TimeBufferInSeconds = ulong . Parse ( input . timeBufferInSeconds ?? "900" ) ,
686
686
BidBufferBps = ulong . Parse ( input . bidBufferBps ?? "500" ) ,
687
687
StartTimestamp = ( ulong ) ( input . startTimestamp ?? await Utils . GetCurrentBlockTimeStamp ( ) + 60 ) ,
@@ -716,8 +716,8 @@ public async Task<TransactionResult> MakeBid(string auctionId, string bidAmount)
716
716
{
717
717
return await TransactionManager . ThirdwebWrite (
718
718
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 ( ) )
721
721
) ;
722
722
}
723
723
}
@@ -905,12 +905,11 @@ public async Task<TransactionResult> MakeOffer(MakeOfferInput input)
905
905
AssetContract = input . assetContractAddress ,
906
906
TokenId = BigInteger . Parse ( input . tokenId ) ,
907
907
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 ( ) ) ,
910
910
ExpirationTimestamp = ( BigInteger ) ( input . endTimestamp ?? Utils . GetUnixTimeStampIn10Years ( ) )
911
911
}
912
- } ,
913
- BigInteger . Parse ( input . totalPrice )
912
+ }
914
913
) ;
915
914
}
916
915
}
0 commit comments