From ab67bdcac6ce40684d4c762ad19340fbf2357af2 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 8 Dec 2020 21:37:26 +0100 Subject: [PATCH] Fix payout size calculation (#4179) --- packages/page-staking/src/Payouts/PayButton.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/page-staking/src/Payouts/PayButton.tsx b/packages/page-staking/src/Payouts/PayButton.tsx index 319db30169..189fa0d0b8 100644 --- a/packages/page-staking/src/Payouts/PayButton.tsx +++ b/packages/page-staking/src/Payouts/PayButton.tsx @@ -94,9 +94,9 @@ function PayButton ({ className, isAll, isDisabled, payout }: Props): React.Reac .sub(api.consts.system.blockWeights.perClass.normal.baseExtrinsic) .div(info.weight) .toNumber() - // 65% of the block weight on a single extrinsic (64 for safety) : (api.consts.system.maximumBlockWeight as Weight) - .muln(64) + .muln(64) // 65% of the block weight on a single extrinsic (64 for safety) + .div(info.weight) .toNumber() / 100 ))) .catch(console.error);