Skip to content

Commit

Permalink
Merge pull request #113 from threshold-network/low-pre-funds-display-fix
Browse files Browse the repository at this point in the history
Low pre funds display fix

Fix displaying low PRE funds label.

Changes:
- display the label only when the PRE is not set up (and of course if the funds
on PRE are low)
  • Loading branch information
r-czajkowski authored May 18, 2022
2 parents b44b8d9 + 85ecb0e commit d3e0a5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/constants/pre.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export const LOW_FUNDS_THRESHOLD_IN_WEI = "10000000000000000" // 0.01 ETH
import { parseEther } from "ethers/lib/utils"

export const LOW_FUNDS_THRESHOLD_IN_WEI = parseEther("0.01")
1 change: 1 addition & 0 deletions src/pages/Staking/StakeCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const StakeCard: FC<{ stake: StakeData }> = ({ stake }) => {

const shouldDisplayLowPREFunds =
!isAddressZero(stake.preConfig.operator) &&
!stake.preConfig.isOperatorConfirmed &&
BigNumber.from(stake.preConfig.operatorEthBalance).lt(
preConstants.LOW_FUNDS_THRESHOLD_IN_WEI
)
Expand Down

0 comments on commit d3e0a5d

Please sign in to comment.