Skip to content

Commit

Permalink
fixes yield pull on own validators (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
VargaElod23 authored Jan 23, 2024
1 parent 8f7c73f commit ac26d11
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions services/community-site/src/pages/Staking/Delegation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const Delegation = ({ location }: { location: Location }) => {
const { asyncCallback } = useWalletPopup();

const { getValidators, getValidatorsWith } = useValidators();
const { updateValidatorsStats } = useExplorerStats();
const { updateValidatorsStats, updateValidatorsRank } = useExplorerStats();
const { getDelegations, getUndelegations, confirmUndelegate, cancelUndelegate, claimAllRewards } =
useDelegation();
const { validatorFrom, showPopup, clearRedelegation } = useRedelegation();
Expand Down Expand Up @@ -237,8 +237,9 @@ const Delegation = ({ location }: { location: Location }) => {
if (delegations.length > 0) {
(async () => {
const myValidators = await getValidatorsWith(delegations.map((d) => d.address));
const myValidatorsWithStats = await updateValidatorsStats(myValidators);
setOwnValidators(myValidatorsWithStats);
const myValidatorsRank = await updateValidatorsRank(myValidators);
const myValidatorsWithStats = await updateValidatorsStats(myValidatorsRank);
setOwnValidators(sortValidators(myValidatorsWithStats));
})();
}
}, [delegations]);
Expand Down

0 comments on commit ac26d11

Please sign in to comment.