This repository was archived by the owner on Feb 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
src/javascript/app/pages/trade Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 11const moment = require ( 'moment' ) ;
2- const countDecimalPlaces = require ( './common_independent' ) . countDecimalPlaces ;
32const Contract = require ( './contract' ) ;
43const Defaults = require ( './defaults' ) ;
54const Tick = require ( './tick' ) ;
@@ -33,7 +32,7 @@ const Barriers = (() => {
3332 const barrier = barriers [ form_name ] [ is_daily ? 'daily' : 'intraday' ] ;
3433 if ( barrier ) {
3534 const current_tick = Tick . quote ( ) ;
36- const decimal_places = countDecimalPlaces ( current_tick ) ;
35+ const decimal_places = Tick . pipSize ( ) ;
3736
3837 const indicative_barrier_tooltip = getElementById ( 'indicative_barrier_tooltip' ) ;
3938 const indicative_high_barrier_tooltip = getElementById ( 'indicative_high_barrier_tooltip' ) ;
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ const Tick = (() => {
108108 const end_time = getElementById ( 'expiry_date' ) ;
109109 if ( unit && ( ! isVisible ( unit ) || unit . value !== 'd' ) && current_tick && ! isNaN ( current_tick ) &&
110110 ( end_time && ( ! isVisible ( end_time ) || moment ( end_time . getAttribute ( 'data-value' ) ) . isBefore ( moment ( ) . add ( 1 , 'day' ) , 'day' ) ) ) ) {
111- const decimal_places = countDecimalPlaces ( current_tick ) ;
111+ const decimal_places = Tick . pipSize ( ) ;
112112 if ( isVisible ( indicative_barrier_tooltip ) && String ( barrier_element . value ) . match ( / ^ [ + - ] / ) ) {
113113 const barrier_value = isNaN ( parseFloat ( barrier_element . value ) ) ? 0 : parseFloat ( barrier_element . value ) ;
114114
You can’t perform that action at this time.
0 commit comments