Skip to content

Commit

Permalink
fix: convert minimum staking amount (#420)
Browse files Browse the repository at this point in the history
Co-authored-by: Hildegard Lydia <37687466+hilyds@users.noreply.github.com>
  • Loading branch information
azmimuhammad and hilyds authored May 13, 2022
1 parent 16cebda commit e97713b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Dialog/DialogStake.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ import Button from "@/components/Button"
import {stakeLabFee} from "@/lib/polkadotProvider/command/labs"
import {queryBalance} from "@/lib/polkadotProvider/query/balance"
import {minimumStakeAmount} from "@/lib/polkadotProvider/query/labs"
import { toEther, fromEther } from "@/lib/balance-format"
import { toEther } from "@/lib/balance-format"
export default {
name: "DialogStake",
Expand Down Expand Up @@ -127,10 +127,10 @@ export default {
async getMinimumStake() {
const stakeAmount = await minimumStakeAmount(this.api)
const minimumStake = stakeAmount ? await toEther(stakeAmount) : toEther(50000)
const _minimumStakeAmount = Number(stakeAmount.replaceAll(",", ""))
this.minimumStake = minimumStake
this.stakeAmount = await fromEther(minimumStake)
this.minimumStake = stakeAmount ? await _minimumStakeAmount : toEther(50000)
this.stakeAmount = new Intl.NumberFormat("en-US").format(_minimumStakeAmount / (10**18))
},
async fetchWalletBalance() {
Expand Down

0 comments on commit e97713b

Please sign in to comment.