fix: bidding for multiple sfxs
@@ -111,6 +111,14 @@ where
.expect("Accessed expected Bid and expected it to be a part of FSX")
}
+ pub fn get_bond_value(&self, max_reward: BalanceOf) -> BalanceOf {
+ if let Some(sfx_bid) = &self.best_bid {
+ sfx_bid.bid.clone()
+ } else {
+ max_reward
+ }
+ }
+
// an sfx_id is generated by hashing its xtx_id with sfx.nonce. This ensures that each sfx has a unique id.
pub fn generate_id<Hasher: sp_core::Hasher, Hash: frame_system::Config>(
&self,
