Skip to content

Commit

Permalink
fix(validators): fix restake error (#1046)
Browse files Browse the repository at this point in the history
  • Loading branch information
happylolonly authored Dec 8, 2023
1 parent a50d9ab commit b6b9a25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/containers/Validators/ActionBarContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
import { trimString } from '../../utils/utils';

import { LEDGER, CYBER } from '../../utils/config';
import useGetHeroes from './getHeroesHook';

const {
STAGE_INIT,
Expand Down Expand Up @@ -157,14 +158,14 @@ const useCheckStatusTx = (txHash, setStage, setErrorMessage, updateFnc) => {
function ActionBarContainer({
addressPocket,
validators,
validatorsAll,
balance,
loadingBalanceInfo,
balanceToken,
unStake,
updateFnc,
}) {
const { signer, signingClient } = useSigningClient();
const { validators: validatorsAll } = useGetHeroes();
const queryClient = useQueryClient();
const navigate = useNavigate();
const [stage, setStage] = useState(STAGE_INIT);
Expand Down
3 changes: 1 addition & 2 deletions src/containers/Validators/Validators.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function Validators({ defaultAccount }) {
const [unStake, setUnStake] = useState(false);
const [delegationsData, setDelegationsData] = useState([]);
const [validatorsData, setValidatorsData] = useState([]);
// FIXME: use useGetHeroes hook instead

useEffect(() => {
setValidatorsData(validators);
Expand Down Expand Up @@ -230,7 +231,6 @@ function Validators({ defaultAccount }) {
<ActionBarContainer
updateFnc={updateFnc}
validators={validatorSelect}
validatorsAll={validatorsData}
addressPocket={addressActive}
unStake={unStake}
mobile={mobile}
Expand All @@ -240,7 +240,6 @@ function Validators({ defaultAccount }) {
/>
</div>
);
// }
}

const mapStateToProps = (store) => {
Expand Down

0 comments on commit b6b9a25

Please sign in to comment.