Skip to content

Commit

Permalink
Merge pull request #64 from pnetwork-association/fix/max-rounding
Browse files Browse the repository at this point in the history
Fix value prop usage in NumericFormat
  • Loading branch information
envin3 authored Jan 22, 2024
2 parents 998449c + 8153a54 commit 0062490
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "plain-dapp-update",
"private": true,
"version": "1.18.0",
"version": "1.18.1",
"type": "module",
"scripts": {
"dev": "npm run create-version-file && vite",
Expand Down
16 changes: 9 additions & 7 deletions src/components/organisms/swapLine/SwapLine.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import React, { useState, useEffect, useMemo } from 'react'
import styled from 'styled-components'
import PropTypes from 'prop-types'
import React, { useState, useEffect, useMemo } from 'react'
import { Row, Col } from 'react-bootstrap'
import { capitalizeAllLettersExceptFirst } from '../../../utils/capitalize'
import Skeleton from 'react-loading-skeleton'
import { NumericFormat } from 'react-number-format'
import AssetInfo from '../assetInfo/AssetInfo'
import Icon from '../../atoms/icon/Icon'
import styled from 'styled-components'

import { getDecimalSeparator, getThousandSeparator } from '../../../utils/amount-utils'
import Skeleton from 'react-loading-skeleton'
import { capitalizeAllLettersExceptFirst } from '../../../utils/capitalize'
import Icon from '../../atoms/icon/Icon'
import AssetInfo from '../assetInfo/AssetInfo'

import 'react-loading-skeleton/dist/skeleton.css'

const SwapLineContainer = styled.div`
Expand Down Expand Up @@ -275,7 +277,7 @@ const SwapLine = ({
disabled={disableInput}
onValueChange={(_e, _source) => onChangeAmount(_e.value.toString().replace(',', '.'), _source)}
prefix={prefix}
value={amount !== '' ? +amount : amount}
value={amount}
allowedDecimalSeparators={[',', '.']}
decimalSeparator={getDecimalSeparator()}
thousandSeparator={getThousandSeparator()}
Expand Down

1 comment on commit 0062490

@4everland
Copy link

@4everland 4everland bot commented on 0062490 Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following parameters

parameters Value
IPFS CID bafybeihnztwo6l4gihn5ucfrjumq3g4nskkfazlrpwhwbmvhczfzazmrru
Assigned domain https://ptokens-dapp-li41iicy-pnetwork-association.4everland.app
https://ptokens-dapp.4everland.app
Custom domain

Please sign in to comment.