This commit is contained in:
Mayukha Vadari
2025-10-09 16:05:45 -04:00
parent 3f5c350c5a
commit 9e4bc87146
2 changed files with 5 additions and 7 deletions

View File

@@ -3453,14 +3453,13 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite
{
std::uint32_t const expiration = lastClose(env) + 25;
auto const buyerSeq0 = env.seq(buyer);
uint256 const offer0 = keylet::nftoffer(buyer, buyerSeq0).key;
uint256 const offer0 = keylet::nftoffer(buyer, env.seq(buyer);).key;
env(token::createOffer(buyer, nftokenID0, drops(1)),
token::owner(minter),
token::expiration(expiration));
buyerCount++;
auto const buyerSeq1 = env.seq(buyer);
uint256 const offer1 = keylet::nftoffer(buyer, env.seq(buyer)).key;
uint256 const offer1 = keylet::nftoffer(buyer, buyerSeq1).key;
env(token::createOffer(buyer, nftokenID1, drops(1)),
token::owner(minter),

View File

@@ -539,7 +539,7 @@ NFTokenAcceptOffer::doApply()
bool foundExpired = false;
auto const deleteOfferIfExpired =
[this, &foundExpired](std::shared_ptr<SLE> offer) -> TER {
[this, &foundExpired](std::shared_ptr<SLE> const& offer) -> TER {
if (offer && hasExpired(view(), (*offer)[~sfExpiration]))
{
JLOG(j_.trace())
@@ -547,9 +547,8 @@ NFTokenAcceptOffer::doApply()
if (!nft::deleteTokenOffer(view(), offer))
{
// LCOV_EXCL_START
JLOG(j_.fatal())
<< "Unable to delete expired offer '"
<< to_string(offer->key()) << "': ignoring";
JLOG(j_.fatal()) << "Unable to delete expired offer '"
<< offer->key() << "': ignoring";
return tecINTERNAL;
// LCOV_EXCL_STOP
}