@@ -25,6 +25,7 @@ import common_functions from '../../../_common/common_functions.js';
25
25
import { localize } from '../../../_common/localize.js' ;
26
26
import dataManager from '../../common/data_manager.js' ;
27
27
import { setDefaultParams } from '../../common/helpers.js' ;
28
+ import { isCryptocurrency } from '../../../_common/base/currency_base.js' ;
28
29
29
30
export const FormComponent = ( ) => {
30
31
const [ tradeData , setTradeData ] = useState ( { } ) ;
@@ -51,6 +52,7 @@ export const FormComponent = () => {
51
52
const expiry_time = Defaults . get ( PARAM_NAMES . EXPIRY_TIME ) ;
52
53
const amount_type = Defaults . get ( PARAM_NAMES . AMOUNT_TYPE ) ;
53
54
const amount = Defaults . get ( PARAM_NAMES . AMOUNT ) ;
55
+ const amount_crypto = Defaults . get ( 'amount_crypto' ) ;
54
56
const currency = Defaults . get ( PARAM_NAMES . CURRENCY ) ;
55
57
const is_equal = Defaults . get ( PARAM_NAMES . IS_EQUAL ) ;
56
58
const prediction = Defaults . get ( PARAM_NAMES . PREDICTION ) ;
@@ -163,6 +165,8 @@ export const FormComponent = () => {
163
165
return moment ( endtime_data . options [ 0 ] . value ) . format ( 'ddd - DD MMM, YYYY' ) ;
164
166
} ;
165
167
168
+ const getAmount = ( ) => isCryptocurrency ( currency ) ? amount_crypto : amount ;
169
+
166
170
return (
167
171
< BreakpointProvider >
168
172
< div className = 'quill-form-container' >
@@ -329,7 +333,7 @@ export const FormComponent = () => {
329
333
< >
330
334
< div className = 'form_field field-pb' >
331
335
< TextField
332
- value = { amount }
336
+ value = { getAmount ( ) }
333
337
type = 'number'
334
338
allowDecimals = { true }
335
339
onChange = { ( e ) => handleAmountChange ( e , 'amount' ) }
@@ -350,7 +354,7 @@ export const FormComponent = () => {
350
354
type = 'number'
351
355
allowDecimals
352
356
onChange = { ( e ) => handleAmountChange ( e , 'amount' ) }
353
- value = { amount }
357
+ value = { getAmount ( ) }
354
358
addonLabel = { currency }
355
359
addOnPosition = 'right'
356
360
/>
0 commit comments