Skip to content

Commit

Permalink
Handle null delegation response
Browse files Browse the repository at this point in the history
  • Loading branch information
tombeynon committed Jun 27, 2023
1 parent 729f156 commit 52c978e
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 52c978e

Please sign in to comment.