Skip to content

Commit

Permalink
fix: limit
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsimao committed Sep 27, 2023
1 parent 4142780 commit b1b3f42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/Staking/components/StakingForm/StakingForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ const StakingForm = ({ accountData, networkData, onStaking, ...props }: StakingF
const hasStake = !!accountData;

const governanceBalance = getAvailableBalance(GOVERNANCE_TOKEN.ticker) || newMonetaryAmount(0, GOVERNANCE_TOKEN);
const inputBalance =
accountData?.limit && governanceBalance && pickSmallerAmount(governanceBalance, accountData.limit);
const inputBalance = accountData?.limit
? governanceBalance && pickSmallerAmount(governanceBalance, accountData.limit)
: governanceBalance;

const getTransactionArgs = useCallback(
async (values: StakingFormData) => {
Expand Down

0 comments on commit b1b3f42

Please sign in to comment.