@@ -21,31 +21,33 @@ public class CreateOrderUseCase
2121
2222 private readonly OrderbookApi m_OrderbookApi = new ( new Configuration { BasePath = Config . BASE_URL } ) ;
2323
24- private CreateOrderUseCase ( ) { }
24+ private CreateOrderUseCase ( )
25+ {
26+ }
2527
2628 public static CreateOrderUseCase Instance => s_Instance . Value ;
2729
2830 /// <summary>
29- /// Creates a new listing for the specified NFT.
31+ /// Creates a new listing for the specified NFT.
3032 /// </summary>
3133 /// <param name="contractAddress">The address of the NFT's contract.</param>
3234 /// <param name="contractType">The type of the contract (e.g., "ERC721" or "ERC1155").</param>
3335 /// <param name="tokenId">The ID of the NFT.</param>
3436 /// <param name="price">
35- /// The sale price of the NFT, represented as a string amount in IMR (scaled by 10^18).
37+ /// The sale price of the NFT, represented as a string amount in IMR (scaled by 10^18).
3638 /// </param>
3739 /// <param name="amountToSell">
38- /// The quantity of the NFT to sell. "1" for ERC721 tokens and a higher number for ERC1155 tokens.
40+ /// The quantity of the NFT to sell. "1" for ERC721 tokens and a higher number for ERC1155 tokens.
3941 /// </param>
4042 /// <param name="buyContractAddress">
41- /// The contract address of the token used to purchase the NFT.
43+ /// The contract address of the token used to purchase the NFT.
4244 /// </param>
4345 /// <param name="confirmListing">
44- /// If true, the function will continuously poll the marketplace endpoint to ensure the listing status
45- /// updates to "ACTIVE" upon creation. If false, the function will not verify the listing status.
46+ /// If true, the function will continuously poll the marketplace endpoint to ensure the listing status
47+ /// updates to "ACTIVE" upon creation. If false, the function will not verify the listing status.
4648 /// </param>
4749 /// <returns>
48- /// A <see cref="UniTask{String}"/> that returns the listing ID if the sale is successfully created.
50+ /// A <see cref="UniTask{String}" /> that returns the listing ID if the sale is successfully created.
4951 /// </returns>
5052 public async UniTask < string > CreateListing (
5153 string contractAddress , string contractType , string tokenId ,
@@ -54,11 +56,11 @@ public async UniTask<string> CreateListing(
5456 try
5557 {
5658 if ( contractType == "ERC721" && amountToSell != "1" )
57- {
58- throw new ArgumentException ( "Invalid arguments: 'amountToSell' must be '1' when listing an ERC721." ) ;
59- }
59+ throw new ArgumentException (
60+ "Invalid arguments: 'amountToSell' must be '1' when listing an ERC721." ) ;
6061
61- var listingData = await PrepareListing ( contractAddress , contractType , tokenId , price , amountToSell , buyContractAddress ) ;
62+ var listingData = await PrepareListing ( contractAddress , contractType , tokenId , price , amountToSell ,
63+ buyContractAddress ) ;
6264
6365 await SignAndSubmitApproval ( listingData ) ;
6466
@@ -78,7 +80,7 @@ public async UniTask<string> CreateListing(
7880 }
7981
8082 /// <summary>
81- /// Prepares a listing for the specified NFT and purchase details.
83+ /// Prepares a listing for the specified NFT and purchase details.
8284 /// </summary>
8385 private async UniTask < PrepareListing200Response > PrepareListing (
8486 string contractAddress , string contractType , string tokenId ,
@@ -95,7 +97,7 @@ private async UniTask<PrepareListing200Response> PrepareListing(
9597 }
9698
9799 /// <summary>
98- /// Creates the appropriate sell request based on the contract type.
100+ /// Creates the appropriate sell request based on the contract type.
99101 /// </summary>
100102 private static PrepareListingRequestSell CreateSellRequest (
101103 string contractType , string contractAddress , string tokenId , string amountToSell )
@@ -109,7 +111,7 @@ private static PrepareListingRequestSell CreateSellRequest(
109111 }
110112
111113 /// <summary>
112- /// Signs and submits approval if required by the listing.
114+ /// Signs and submits approval if required by the listing.
113115 /// </summary>
114116 private async UniTask SignAndSubmitApproval ( PrepareListing200Response listingData )
115117 {
@@ -132,7 +134,7 @@ private async UniTask SignAndSubmitApproval(PrepareListing200Response listingDat
132134 }
133135
134136 /// <summary>
135- /// Signs the listing with the user's wallet.
137+ /// Signs the listing with the user's wallet.
136138 /// </summary>
137139 private async UniTask < string > SignListing ( PrepareListing200Response listingData )
138140 {
@@ -148,7 +150,7 @@ private async UniTask<string> SignListing(PrepareListing200Response listingData)
148150 }
149151
150152 /// <summary>
151- /// Finalises the listing and returns the listing ID.
153+ /// Finalises the listing and returns the listing ID.
152154 /// </summary>
153155 private async UniTask < string > ListAsset ( string signature , PrepareListing200Response listingData )
154156 {
@@ -162,7 +164,7 @@ private async UniTask<string> ListAsset(string signature, PrepareListing200Respo
162164 }
163165
164166 /// <summary>
165- /// Handles API exceptions by logging relevant details.
167+ /// Handles API exceptions by logging relevant details.
166168 /// </summary>
167169 private static void HandleApiException ( ApiException e )
168170 {
@@ -173,4 +175,4 @@ private static void HandleApiException(ApiException e)
173175 if ( errorModel != null ) throw new Exception ( errorModel . message ) ;
174176 }
175177 }
176- }
178+ }
0 commit comments