From a8060a0ca60312a0d1af7f50880366656473ca8e Mon Sep 17 00:00:00 2001 From: timur <12267899-timur.5@users.noreply.gitlab.com> Date: Wed, 14 Dec 2022 10:59:02 -0400 Subject: [PATCH] Limit NFT objes returned --- libraries/app/database_api.cpp | 1 + libraries/wallet/include/graphene/wallet/wallet.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/app/database_api.cpp b/libraries/app/database_api.cpp index 2087d3c5..fd41774d 100644 --- a/libraries/app/database_api.cpp +++ b/libraries/app/database_api.cpp @@ -3111,6 +3111,7 @@ vector database_api_impl::nft_get_all_tokens(const nft_id_type lower FC_ASSERT(limit <= api_limit_nft_tokens, "Number of querying nft tokens can not be greater than ${configured_limit}", ("configured_limit", api_limit_nft_tokens)); + const auto &idx_nft = _db.get_index_type().indices().get(); vector result; result.reserve(limit); diff --git a/libraries/wallet/include/graphene/wallet/wallet.hpp b/libraries/wallet/include/graphene/wallet/wallet.hpp index 28cdc42a..f858a521 100644 --- a/libraries/wallet/include/graphene/wallet/wallet.hpp +++ b/libraries/wallet/include/graphene/wallet/wallet.hpp @@ -2572,7 +2572,7 @@ class wallet_api /** * @brief Returns all tokens * @param limit the maximum number of NFT objects to return (max: 100) - * @param lowerbound the symbol of the first NFT object to include in the list. + * @param lowerbound token_id the symbol of the first NFT object to include in the list. * @return Returns vector of NFT objects, empty vector if none */ vector nft_get_all_tokens(uint32_t limit, optional lower_id) const;