Skip to content

Commit

Permalink
fix: also update attracted on owned stake changes
Browse files Browse the repository at this point in the history
  • Loading branch information
VmMad committed Dec 7, 2023
1 parent 854837e commit 2df793d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/ManaCalculator/hooks/useManaState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,13 @@ export function useGivenManaState(
}

function handleOwnHoldChange(value: number) {
setState({
const newState = {
...state,
heldTokens: value,
[getStakedOrDelegated(state.userType)]: value,
});
};

setState({ ...newState, ...getDerivedRoleValues(newState, value) });
}

const congestionAmount = getNetworkCongestion(
Expand Down

0 comments on commit 2df793d

Please sign in to comment.