File tree 2 files changed +11
-18
lines changed
2 files changed +11
-18
lines changed Original file line number Diff line number Diff line change @@ -303,22 +303,13 @@ initializeFeeAuctionVote(
303
303
// AMM creator gets the auction slot for free.
304
304
// AuctionSlot is created on AMMCreate and updated on AMMDeposit
305
305
// when AMM is in an empty state
306
- STObject& auctionSlot = [&]() -> STObject& {
307
- if (!rules.enabled (fixInnerObjTemplate))
308
- {
309
- return ammSle->peekFieldObject (sfAuctionSlot);
310
- }
311
- else
312
- {
313
- if (!ammSle->isFieldPresent (sfAuctionSlot))
314
- {
315
- STObject auctionSlot =
316
- STObject::makeInnerObject (sfAuctionSlot, rules);
317
- ammSle->set (std::move (auctionSlot));
318
- }
319
- return ammSle->peekFieldObject (sfAuctionSlot);
320
- }
321
- }();
306
+ if (rules.enabled (fixInnerObjTemplate) &&
307
+ !ammSle->isFieldPresent (sfAuctionSlot))
308
+ {
309
+ STObject auctionSlot = STObject::makeInnerObject (sfAuctionSlot, rules);
310
+ ammSle->set (std::move (auctionSlot));
311
+ }
312
+ STObject& auctionSlot = ammSle->peekFieldObject (sfAuctionSlot);
322
313
auctionSlot.setAccountID (sfAccount, account);
323
314
// current + sec in 24h
324
315
auto const expiration = std::chrono::duration_cast<std::chrono::seconds>(
Original file line number Diff line number Diff line change @@ -787,8 +787,10 @@ AMM::expectAuctionSlot(auto&& cb) const
787
787
static_cast <STObject const &>(amm->peekAtField (sfAuctionSlot));
788
788
if (auctionSlot.isFieldPresent (sfAccount))
789
789
{
790
- // this could fail in pre-fixInnerObjTemplate test if one
791
- // the fail-cases. access as optional to avoid the failure
790
+ // This could fail in pre-fixInnerObjTemplate tests
791
+ // if the submitted transactions recreate one of
792
+ // the failure scenarios. Access as optional
793
+ // to avoid the failure.
792
794
auto const slotFee = auctionSlot[~sfDiscountedFee].value_or (0 );
793
795
auto const slotInterval = ammAuctionTimeSlot (
794
796
env_.app ().timeKeeper ().now ().time_since_epoch ().count (),
You can’t perform that action at this time.
0 commit comments