@@ -10,17 +10,18 @@ import { SelectorPopover } from '@/app/components/Popover';
1010import DropDown from '@/assets/icons/arrow-down.svg' ;
1111import useWidth from '@/hooks/useWidth' ;
1212import { getSupportedXChainForIntentToken } from '@/lib/sodax/utils' ;
13+ import { useTokenPricesWithPyth } from '@/queries/backendv2' ;
1314import { COMMON_PERCENTS } from '@/store/swap/reducer' ;
1415import { escapeRegExp } from '@/utils' ;
1516import { formatBalance , formatSymbol } from '@/utils/formatter' ;
1617import {
1718 DEFAULT_TOKEN_CHAIN ,
19+ convertCurrency ,
1820 getSupportedXChainForSwapToken ,
1921 getSupportedXChainIdsForSwapToken ,
2022 icon ,
21- sui ,
2223 stellar ,
23- convertCurrency ,
24+ sui ,
2425} from '@balancednetwork/xwagmi' ;
2526import { XChainId } from '@balancednetwork/xwagmi' ;
2627import { isMobile } from 'react-device-detect' ;
@@ -29,7 +30,6 @@ import { CurrencySelectionType } from '../SearchModal/CurrencySearch';
2930import CurrencySearchModal from '../SearchModal/CurrencySearchModal' ;
3031import CrossChainOptions from '../trade/CrossChainOptions' ;
3132import DollarValue from './DollarValue' ;
32- import { useTokenPricesWithPyth } from '@/queries/backendv2' ;
3333
3434const InputContainer = styled . div `
3535 display: inline-flex;
@@ -76,7 +76,7 @@ const NumberInput = styled.input<{ bg?: string; $active?: boolean; $showDollarVa
7676 border-radius: 0 10px 10px 0;
7777 border: ${ ( { theme, bg = 'bg2' } ) => `2px solid ${ theme . colors [ bg ] } ` } ;
7878 background-color: ${ ( { theme, bg = 'bg2' } ) => `${ theme . colors [ bg ] } ` } ;
79- color: ${ ( { disabled , theme } ) => ( disabled ? theme . colors . text2 : ' #ffffff' ) } ;
79+ color: #ffffff;
8080 padding: ${ ( { $showDollarValue } ) => ( $showDollarValue ? '1px 15px 20px' : '7px 15px' ) } ;
8181 outline: none;
8282 transition: all 0.3s ease;
@@ -277,11 +277,11 @@ export default function CurrencyInputPanel({
277277
278278 < NumberInput
279279 placeholder = { placeholder }
280- value = { ! percent ? value : price ? formatBalance ( value , price . toFixed ( ) ) : value }
280+ value = { ! percent ? value : price ? formatBalance ( value , price . toFixed ( ) ) . replace ( / , / g , '' ) : value }
281281 onClick = { ( ) => setIsActive ( ! isActive ) }
282282 onBlur = { ( ) => setIsActive ( false ) }
283283 onChange = { event => {
284- enforcer ( event . target . value . replace ( / , / g, '. ' ) ) ;
284+ enforcer ( event . target . value . replace ( / , / g, '' ) ) ;
285285 } }
286286 disabled = { disabled }
287287 // universal input options
0 commit comments