@@ -11,7 +11,7 @@ import { WalletContext } from 'context/WalletContext'
11
11
import { StatsContext } from 'context/StatsContext'
12
12
import Web3Context from 'context/Web3Context'
13
13
import { TxStateMachine } from 'hooks/useTxStateMachine'
14
- import { amountOrZero } from 'utils/amount'
14
+ import { amountOrZero , formatTokenBalance } from 'utils/amount'
15
15
import { PositiveInput } from 'components/PositiveInput'
16
16
import { SingleTxModal } from 'components/SingleTxModal'
17
17
import { GeyserInteractionButton } from './GeyserInteractionButton'
@@ -43,8 +43,7 @@ export const GeyserStakeView = () => {
43
43
geyserAction,
44
44
} = useContext ( GeyserContext )
45
45
const { decimals : stakingTokenDecimals , symbol : stakingTokenSymbol , address : stakingTokenAddress } = stakingTokenInfo
46
- const { decimals : rewardTokenDecimals , symbol : rewardTokenSymbol , address : rewardTokenAddress } = rewardTokenInfo
47
- // const { signer } = useContext(Web3Context)
46
+ const { symbol : rewardTokenSymbol , address : rewardTokenAddress } = rewardTokenInfo
48
47
const { selectedVault, currentLock, withdrawUnlockedFromVault, rewardAmountClaimedOnUnstake } =
49
48
useContext ( VaultContext )
50
49
const { stakingTokenBalance, underlyingTokenBalance, refreshWalletBalances } = useContext ( WalletContext )
@@ -56,7 +55,6 @@ export const GeyserStakeView = () => {
56
55
57
56
const currentStakeAmount = BigNumber . from ( ready && currentLock ? currentLock . amount : '0' )
58
57
const [ unstakeConfirmModalOpen , setUnstakeConfirmModalOpen ] = useState < boolean > ( false )
59
- const [ actualRewardsFromUnstake , setActualRewardsFromUnstake ] = useState < BigNumber > ( BigNumber . from ( '0' ) )
60
58
const [ actualStakingTokensFromUnstake , setActualStakingTokensFromUnstake ] = useState < BigNumber > ( BigNumber . from ( '0' ) )
61
59
const [ txModalOpen , setTxModalOpen ] = useState < boolean > ( false )
62
60
const [ wrapToken , setWrapToken ] = useState < number > ( 1 )
@@ -169,7 +167,7 @@ export const GeyserStakeView = () => {
169
167
< WithdrawTxMessage
170
168
txStateMachine = { txStateMachine }
171
169
symbol = { rewardTokenSymbol }
172
- amount = { formatUnits ( actualRewardsFromUnstake , rewardTokenDecimals ) }
170
+ amount = { formatUnits ( actualStakingTokensFromUnstake , stakingTokenDecimals ) }
173
171
/>
174
172
)
175
173
@@ -209,7 +207,7 @@ export const GeyserStakeView = () => {
209
207
< span >
210
208
Successfully staked{ ' ' }
211
209
< b >
212
- { userInput } { stakingTokenSymbol }
210
+ { formatTokenBalance ( userInput ) } { stakingTokenSymbol }
213
211
</ b >
214
212
.
215
213
</ span >
@@ -257,9 +255,9 @@ export const GeyserStakeView = () => {
257
255
< span >
258
256
Successfully unstaked{ ' ' }
259
257
< b >
260
- { userInput } { stakingTokenSymbol }
258
+ { formatTokenBalance ( userInput ) } { stakingTokenSymbol }
261
259
</ b >
262
- . Switch to the vault tab to withdraw tokens to your wallet.
260
+ .
263
261
</ span >
264
262
}
265
263
onClose = { onCloseTxModal }
0 commit comments