Skip to content

Commit

Permalink
Add staking minimum amount
Browse files Browse the repository at this point in the history
  • Loading branch information
DemogorGod committed Jun 27, 2023
1 parent 659f606 commit 0929022
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/web/src/pages/overview/components/Staking.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ watch(formattedAmountToStake, async () => {
if(formattedAmountToStake.value){
const floatAmount = parseFloat(formattedAmountToStake.value?.replace(/,/g, ''))
let maxAmount
// minAmount is 0.0001 ETH
let minAmount = 0.0001
if(selectedWallet.value){
maxAmount = await getEthersBalance(selectedWallet.value)
}else{
Expand All @@ -120,9 +121,13 @@ watch(formattedAmountToStake, async () => {
if(floatAmount > maxAmount){
errorMessage.value = 'Insufficient Funds'
} else {
} else if(floatAmount < minAmount){
errorMessage.value = 'Minimun Staking is 0.0001 ETH'
}else {
errorMessage.value = null
}
}else{
errorMessage.value = null
}
})
Expand Down

0 comments on commit 0929022

Please sign in to comment.