@@ -146,7 +146,7 @@ public async Task<DirectListing> GetListing(string listingID)
146146 currency . symbol ,
147147 currency . decimals ,
148148 result . Listing . PricePerToken . ToString ( ) ,
149- result . Listing . PricePerToken . ToString ( ) . ToEth ( )
149+ result . Listing . PricePerToken . ToString ( ) . FormatERC20 ( 4 , int . Parse ( currency . decimals ) , true )
150150 ) ,
151151 pricePerToken = result . Listing . PricePerToken . ToString ( ) ,
152152 asset = metadata ,
@@ -277,7 +277,7 @@ public async Task<TransactionResult> CreateListing(CreateListingInput input)
277277 AssetContract = input . assetContractAddress ,
278278 TokenId = BigInteger . Parse ( input . tokenId ) ,
279279 Quantity = BigInteger . Parse ( input . quantity ?? "1" ) ,
280- Currency = input . currencyContractAddress ?? Utils . NativeTokenAddressV2 ,
280+ Currency = input . currencyContractAddress ?? Utils . NativeTokenAddress ,
281281 PricePerToken = BigInteger . Parse ( input . pricePerToken ) ,
282282 StartTimestamp = ( BigInteger ) ( input . startTimestamp ?? await Utils . GetCurrentBlockTimeStamp ( ) + 60 ) ,
283283 EndTimestamp = ( BigInteger ) ( input . endTimestamp ?? Utils . GetUnixTimeStampNow ( ) + 60 * 60 * 24 * 7 ) ,
@@ -480,15 +480,15 @@ public async Task<Auction> GetAuction(string auctionId)
480480 currency . symbol ,
481481 currency . decimals ,
482482 result . Auction . MinimumBidAmount . ToString ( ) ,
483- result . Auction . MinimumBidAmount . ToString ( ) . ToEth ( )
483+ result . Auction . MinimumBidAmount . ToString ( ) . FormatERC20 ( 4 , int . Parse ( currency . decimals ) , true )
484484 ) ,
485485 buyoutBidAmount = result . Auction . BuyoutBidAmount . ToString ( ) ,
486486 buyoutCurrencyValue = new CurrencyValue (
487487 currency . name ,
488488 currency . symbol ,
489489 currency . decimals ,
490490 result . Auction . BuyoutBidAmount . ToString ( ) ,
491- result . Auction . BuyoutBidAmount . ToString ( ) . ToEth ( )
491+ result . Auction . BuyoutBidAmount . ToString ( ) . FormatERC20 ( 4 , int . Parse ( currency . decimals ) , true )
492492 ) ,
493493 timeBufferInSeconds = ( int ) result . Auction . TimeBufferInSeconds ,
494494 bidBufferBps = ( int ) result . Auction . BidBufferBps ,
@@ -525,7 +525,7 @@ public async Task<CurrencyValue> GetMinimumNextBid(string auctionId)
525525 var winningBid = await GetWinningBid ( auctionId ) ;
526526 var cv = auction . minimumBidCurrencyValue . Value ;
527527 cv . value = ( BigInteger . Parse ( cv . value ) + BigInteger . Parse ( winningBid . bidAmount ) ) . ToString ( ) ;
528- cv . displayValue = cv . value . ToEth ( ) ;
528+ cv . displayValue = cv . value . FormatERC20 ( 4 , int . Parse ( cv . decimals ) , true ) ;
529529 return cv ;
530530 }
531531 }
@@ -583,7 +583,13 @@ public async Task<Bid> GetWinningBid(string auctionId)
583583 bidderAddress = winningBid . Bidder ,
584584 currencyContractAddress = winningBid . Currency ,
585585 bidAmount = winningBid . BidAmount . ToString ( ) ,
586- bidAmountCurrencyValue = new CurrencyValue ( c . name , c . symbol , c . decimals , winningBid . BidAmount . ToString ( ) , winningBid . BidAmount . ToString ( ) . ToEth ( ) )
586+ bidAmountCurrencyValue = new CurrencyValue (
587+ c . name ,
588+ c . symbol ,
589+ c . decimals ,
590+ winningBid . BidAmount . ToString ( ) ,
591+ winningBid . BidAmount . ToString ( ) . FormatERC20 ( 4 , int . Parse ( c . decimals ) , true )
592+ )
587593 } ;
588594 }
589595 }
@@ -676,7 +682,7 @@ public async Task<TransactionResult> CreateAuction(CreateAuctionInput input)
676682 AssetContract = input . assetContractAddress ,
677683 TokenId = BigInteger . Parse ( input . tokenId ) ,
678684 Quantity = BigInteger . Parse ( input . quantity ?? "1" ) ,
679- Currency = input . currencyContractAddress ?? Utils . NativeTokenAddressV2 ,
685+ Currency = input . currencyContractAddress ?? Utils . NativeTokenAddress ,
680686 MinimumBidAmount = BigInteger . Parse ( input . minimumBidAmount . ToWei ( ) ) ,
681687 BuyoutBidAmount = BigInteger . Parse ( input . buyoutBidAmount . ToWei ( ) ) ,
682688 TimeBufferInSeconds = ulong . Parse ( input . timeBufferInSeconds ?? "900" ) ,
@@ -834,7 +840,13 @@ public async Task<Offer> GetOffer(string offerID)
834840 tokenId = result . Offer . TokenId . ToString ( ) ,
835841 quantity = result . Offer . Quantity . ToString ( ) ,
836842 currencyContractAddress = result . Offer . Currency ,
837- currencyValue = new CurrencyValue ( currency . name , currency . symbol , currency . decimals , result . Offer . TotalPrice . ToString ( ) , result . Offer . TotalPrice . ToString ( ) . ToEth ( ) ) ,
843+ currencyValue = new CurrencyValue (
844+ currency . name ,
845+ currency . symbol ,
846+ currency . decimals ,
847+ result . Offer . TotalPrice . ToString ( ) ,
848+ result . Offer . TotalPrice . ToString ( ) . FormatERC20 ( 4 , int . Parse ( currency . decimals ) , true )
849+ ) ,
838850 totalPrice = result . Offer . TotalPrice . ToString ( ) ,
839851 asset = metadata ,
840852 endTimeInSeconds = ( long ) result . Offer . ExpirationTimestamp ,
0 commit comments