diff --git a/apps/namadillo/src/App/Staking/Unstake.tsx b/apps/namadillo/src/App/Staking/Unstake.tsx index e99b9f86b..c28ab4487 100644 --- a/apps/namadillo/src/App/Staking/Unstake.tsx +++ b/apps/namadillo/src/App/Staking/Unstake.tsx @@ -138,6 +138,12 @@ const Unstake = (): JSX.Element => { const validationMessage = ((): string => { if (totalStakedAmount.lt(totalUpdatedAmount)) return "Invalid amount"; + + for (const address in updatedAmountByAddress) { + if (stakedAmountByAddress[address].lt(updatedAmountByAddress[address])) { + return "Invalid amount"; + } + } return ""; })(); diff --git a/apps/namadillo/src/App/Staking/UnstakeBondingTable.tsx b/apps/namadillo/src/App/Staking/UnstakeBondingTable.tsx index 018b10d26..1d749e5a4 100644 --- a/apps/namadillo/src/App/Staking/UnstakeBondingTable.tsx +++ b/apps/namadillo/src/App/Staking/UnstakeBondingTable.tsx @@ -70,6 +70,7 @@ export const UnstakeBondingTable = ({ updatedAmountByAddress[validator.address] ?? new BigNumber(0); const hasNewAmounts = amountToUnstake.gt(0); + const newAmount = stakedAmount.minus(amountToUnstake); return { className: "", @@ -114,9 +115,15 @@ export const UnstakeBondingTable = ({ {hasNewAmounts && ( - + = - + )} ,