Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit d91bd7d

Browse files
committed
Fixed missing trailing zero in display values of barrier tick
1 parent 466874f commit d91bd7d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/javascript/app/pages/trade/barriers.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const moment = require('moment');
2-
const countDecimalPlaces = require('./common_independent').countDecimalPlaces;
32
const Contract = require('./contract');
43
const Defaults = require('./defaults');
54
const 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');

src/javascript/app/pages/trade/tick.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)