Skip to content

Commit

Permalink
fix input decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
imhson committed Dec 22, 2022
1 parent b9aab07 commit b666d25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { calculateFee, GasPrice } from '@cosmjs/stargate'
import BigNumber from 'bignumber.js'
import calculateGasFee from 'src/logic/providers/utils/fee'

const nativeCurrency = getNativeCurrency()

export const validateFloatNumber = (value: any): boolean => {
return !isNaN(parseFloat(value)) && isFinite(value)
}
export const formatNumber = (value: any): string => {
const nativeCurrency = getNativeCurrency()

if (value == '' || value == 0) return value
const valueString = String(value)
const [integer, fractional] = valueString.split('.')
Expand Down

0 comments on commit b666d25

Please sign in to comment.