Skip to content

Commit

Permalink
Merge pull request #739 from eco-stake/null-delegation-response
Browse files Browse the repository at this point in the history
Handle null delegation response
  • Loading branch information
tombeynon authored Jun 27, 2023
2 parents 729f156 + 52c978e commit daf955d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/QueryClient.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ const QueryClient = async (chainId, restUrls, opts) => {
return getAllPages((nextKey) => {
return getValidatorDelegations(validatorAddress, pageSize, opts, nextKey);
}, pageCallback).then((pages) => {
return pages.map((el) => el.delegation_responses).flat();
return _.compact(pages.map((el) => {
return el.delegation_responses
}).flat());
});
}

Expand Down

0 comments on commit daf955d

Please sign in to comment.