@@ -25,6 +25,7 @@ import common_functions from '../../../_common/common_functions.js';
2525import { localize } from '../../../_common/localize.js' ;
2626import dataManager from '../../common/data_manager.js' ;
2727import { setDefaultParams } from '../../common/helpers.js' ;
28+ import { isCryptocurrency } from '../../../_common/base/currency_base.js' ;
2829
2930export const FormComponent = ( ) => {
3031 const [ tradeData , setTradeData ] = useState ( { } ) ;
@@ -51,6 +52,7 @@ export const FormComponent = () => {
5152 const expiry_time = Defaults . get ( PARAM_NAMES . EXPIRY_TIME ) ;
5253 const amount_type = Defaults . get ( PARAM_NAMES . AMOUNT_TYPE ) ;
5354 const amount = Defaults . get ( PARAM_NAMES . AMOUNT ) ;
55+ const amount_crypto = Defaults . get ( 'amount_crypto' ) ;
5456 const currency = Defaults . get ( PARAM_NAMES . CURRENCY ) ;
5557 const is_equal = Defaults . get ( PARAM_NAMES . IS_EQUAL ) ;
5658 const prediction = Defaults . get ( PARAM_NAMES . PREDICTION ) ;
@@ -163,6 +165,8 @@ export const FormComponent = () => {
163165 return moment ( endtime_data . options [ 0 ] . value ) . format ( 'ddd - DD MMM, YYYY' ) ;
164166 } ;
165167
168+ const getAmount = ( ) => isCryptocurrency ( currency ) ? amount_crypto : amount ;
169+
166170 return (
167171 < BreakpointProvider >
168172 < div className = 'quill-form-container' >
@@ -329,7 +333,7 @@ export const FormComponent = () => {
329333 < >
330334 < div className = 'form_field field-pb' >
331335 < TextField
332- value = { amount }
336+ value = { getAmount ( ) }
333337 type = 'number'
334338 allowDecimals = { true }
335339 onChange = { ( e ) => handleAmountChange ( e , 'amount' ) }
@@ -350,7 +354,7 @@ export const FormComponent = () => {
350354 type = 'number'
351355 allowDecimals
352356 onChange = { ( e ) => handleAmountChange ( e , 'amount' ) }
353- value = { amount }
357+ value = { getAmount ( ) }
354358 addonLabel = { currency }
355359 addOnPosition = 'right'
356360 />
0 commit comments