Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty owner tokens start_index error #962

Merged
merged 4 commits into from
Nov 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ impl NonFungibleTokenEnumeration for NonFungibleToken {
} else {
return vec![];
};

if token_set.is_empty() {
return vec![];
}

let limit = limit.map(|v| v as usize).unwrap_or(usize::MAX);
require!(limit != 0, "Cannot provide limit of 0.");
let start_index: u128 = from_index.map(From::from).unwrap_or_default();
Expand Down