Skip to content

Commit

Permalink
show unstaking amount when unstaking
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-d committed Apr 17, 2024
1 parent c0960d6 commit 17d51b8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,9 @@ const FlyStakingStatsModal = ({ visible, close, showConnectWalletModal, shouldUp
`${getValueFromFlyAmount(flyBalance.sub(stakeAmount))} $FLY remaining` :
`${getValueFromFlyAmount(new BN(flyStaked.toString()).sub(unstakeAmount))} $FLY staked remaining`}
<div className="flex" style={{gap: '0.5em'}}>
<Text size="md">Staking {getValueFromFlyAmount(stakeAmount)} $FLY</Text>
{isStaking ?
<Text size="md">Staking {getValueFromFlyAmount(stakeAmount)} $FLY</Text> :
<Text size="md">Unstaking {getValueFromFlyAmount(unstakeAmount)} $FLY</Text>}
<div onClick={setMaxBalance}>
<Text prominent size="md" className="max-balance-text">Max</Text>
</div>
Expand Down Expand Up @@ -618,7 +620,7 @@ const FlyStakingStatsModal = ({ visible, close, showConnectWalletModal, shouldUp
<div className="fly-staking-stats-modal-row">
{currentStatus < State.HasStaked ? <BaseCircle /> : <Checked />}
<div className="flex-column">
<Text size="lg" prominent>{isStaking ? "Stake" : "Unstake"} $FLY {getValueFromFlyAmount(stakeAmount)}</Text>
<Text size="lg" prominent>{isStaking ? `Stake $FLY ${getValueFromFlyAmount(stakeAmount)}`: `Unstake $FLY ${getValueFromFlyAmount(unstakeAmount)}`}</Text>
{
currentStatus >= State.HasStaked && (
isStaking ?
Expand Down

0 comments on commit 17d51b8

Please sign in to comment.