fix: Fail to deduplicate the same nfts in ttNFTOKEN_CANCEL_OFFER (#1542)

This commit is contained in:
cyan317
2024-07-16 10:50:20 +01:00
committed by GitHub
parent d6ae890f83
commit 8a613c5de8
4 changed files with 66 additions and 6 deletions

View File

@@ -758,7 +758,7 @@ CreateCancelNFTOffersTxWithMetadata(
tx.setFieldAmount(ripple::sfFee, amount);
tx.setFieldU32(ripple::sfSequence, seq);
ripple::STVector256 offers;
offers.resize(2);
offers.resize(nftOffers.size());
std::transform(nftOffers.cbegin(), nftOffers.cend(), offers.begin(), [&](auto const& nftId) {
return ripple::uint256{nftId.c_str()};
});