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

Commit dcd0ee2

Browse files
committed
Edge case: Fixed trade overlay chart incorrectly assigning pip size
1 parent ff6b326 commit dcd0ee2

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,8 @@ const Purchase = (() => {
230230
if (show_chart && has_chart) {
231231
// calculate number of decimals needed to display tick-chart according to the spot
232232
// value of the underlying
233-
let decimal_points = 2;
234-
const tick_spots = Tick.spots();
235-
const tick_spot_epochs = Object.keys(tick_spots);
236-
if (tick_spot_epochs.length > 0) {
237-
const last_quote = tick_spots[tick_spot_epochs[0]].toString();
238-
239-
if (last_quote.indexOf('.') !== -1) {
240-
decimal_points = last_quote.split('.')[1].length;
241-
}
242-
}
243-
244-
let category = sessionStorage.getItem('formname');
233+
const decimal_points = Tick.pipSize();
234+
let category = sessionStorage.getItem('formname');
245235
if (/^(risefall|higherlower)$/.test(category)) {
246236
category = 'callput';
247237
}

0 commit comments

Comments
 (0)