Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: decimal places on stake form and quickstake form #304

Merged
merged 1 commit into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/txs/stake/QuickStakeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ const QuickStakeForm = (props: Props) => {
)

const token = action === QuickStakeAction.DELEGATE ? baseAsset : ""

const tx = {
decimals: readNativeDenom(token)?.decimals,
token,
amount,
balance,
Expand Down
3 changes: 3 additions & 0 deletions src/txs/stake/StakeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { getPlaceholder, toInput } from "../utils"
import validate from "../validate"
import Tx from "txs/Tx"
import { useInterchainAddresses } from "auth/hooks/useAddress"
import { useNativeDenoms } from "data/token"

interface TxValues {
source?: ValAddress
Expand All @@ -41,6 +42,7 @@ const StakeForm = (props: Props) => {
const { tab, destination, balances, validators, delegations, chainID } = props

const { t } = useTranslation()
const readNativeDenom = useNativeDenoms()
const addresses = useInterchainAddresses()
const address = addresses?.[chainID]
const networks = useNetwork()
Expand Down Expand Up @@ -123,6 +125,7 @@ const StakeForm = (props: Props) => {

const token = tab === StakeAction.DELEGATE ? baseAsset : ""
const tx = {
decimals: readNativeDenom(token)?.decimals,
token,
amount,
balance,
Expand Down