Skip to content

Commit 709ebdc

Browse files
committed
chore: add tg message
1 parent 8e20d4d commit 709ebdc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/namadillo/src/App/Staking/IncrementBonding.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { accountBalanceAtom, defaultAccountAtom } from "atoms/accounts";
1111
import { chainParametersAtom } from "atoms/chain";
1212
import { createBondTxAtom } from "atoms/staking";
1313
import { allValidatorsAtom } from "atoms/validators";
14+
import BigNumber from "bignumber.js";
1415
import clsx from "clsx";
1516
import { useStakeModule } from "hooks/useStakeModule";
1617
import { useTransaction } from "hooks/useTransaction";
@@ -77,7 +78,11 @@ const IncrementBonding = (): JSX.Element => {
7778
updatedAmountByAddress,
7879
onChangeValidatorAmount,
7980
} = useStakeModule({ account });
80-
81+
const totalVotingPower = validators?.data?.reduce(
82+
(sum, validator) =>
83+
sum.plus(validator.votingPowerInNAM || new BigNumber(0)),
84+
new BigNumber(0)
85+
);
8186
const parseUpdatedAmounts = (): BondMsgValue[] => {
8287
if (!account?.address) return [];
8388
return Object.keys(updatedAmountByAddress)

0 commit comments

Comments
 (0)