From bd3e7a329956a8a9b9f042982649590b17d8cdb0 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Wed, 4 Dec 2024 20:38:31 +0000 Subject: [PATCH 1/2] go --- auction-server/src/auction/api.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/auction-server/src/auction/api.rs b/auction-server/src/auction/api.rs index 3f74434d7..43a4ec53e 100644 --- a/auction-server/src/auction/api.rs +++ b/auction-server/src/auction/api.rs @@ -139,11 +139,12 @@ pub enum BidStatusEvm { #[serde(tag = "type", rename_all = "snake_case")] pub enum BidStatusSvm { /// The temporary state which means the auction for this bid is pending. + /// It will be updated to Lost or Submitted after the auction takes place. #[schema(title = "Pending")] Pending, /// The bid lost the auction. - /// The result will be None if the auction does not result in a transaction being submitted to the chain. - /// The result will be Some if this bid lost to another bid and the winning bid was submitted to the chain. + /// The result will be None if the auction had no winner (because all bids were found to be invalid). + /// The result will be Some if this bid lost to another bid. /// The signature of the transaction for the submitted bid is the result value. #[schema(title = "Lost")] Lost { @@ -151,7 +152,7 @@ pub enum BidStatusSvm { #[serde(with = "crate::serde::nullable_signature_svm")] result: Option, }, - /// The bid won the auction and was submitted to the chain, with the transaction with the signature. + /// The bid won the auction and was submitted to the chain, with the signature of the corresponding transaction provided in the result field. /// This state is temporary and will be updated to either Won or Failed after the transaction is included in a block, or Expired if the transaction expires before it is included. #[schema(title = "Submitted")] Submitted { From 7daef03ea8259dc98f1e20e1e7d7630316960ef6 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Fri, 6 Dec 2024 18:11:35 +0000 Subject: [PATCH 2/2] improve --- auction-server/src/auction/api.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/auction-server/src/auction/api.rs b/auction-server/src/auction/api.rs index 43a4ec53e..f4c6f9fd4 100644 --- a/auction-server/src/auction/api.rs +++ b/auction-server/src/auction/api.rs @@ -143,9 +143,8 @@ pub enum BidStatusSvm { #[schema(title = "Pending")] Pending, /// The bid lost the auction. - /// The result will be None if the auction had no winner (because all bids were found to be invalid). - /// The result will be Some if this bid lost to another bid. - /// The signature of the transaction for the submitted bid is the result value. + /// This bid status will have a result field containing the signature of the transaction corresponding to the winning bid, + /// unless the auction had no winner (because all bids were found to be invalid). #[schema(title = "Lost")] Lost { #[schema(example = "Jb2urXPyEh4xiBgzYvwEFe4q1iMxG1DNxWGGQg94AmKgqFTwLAiTiHrYiYxwHUB4DV8u5ahNEVtMMDm3sNSRdTg", value_type = Option)]