Skip to content

Commit

Permalink
fix: add price info (deriv-com#17641)
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-deriv authored Nov 26, 2024
1 parent b4f847c commit b9603d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/trader/src/Stores/Modules/Trading/trade-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1947,6 +1947,10 @@ export default class TradeStore extends BaseStore {
wsSubscribe = (req: TicksHistoryRequest, callback: (response: TTicksHistoryResponse) => void) => {
const passthrough_callback = (...args: [TTicksHistoryResponse]) => {
callback(...args);
if ('ohlc' in args[0] && this.root_store.contract_trade.granularity !== 0) {
const { close, pip_size } = args[0].ohlc as { close: string; pip_size: number };
if (close && pip_size) this.setTickData({ pip_size, quote: Number(close) });
}
if (this.is_accumulator) {
let current_spot_data = {};
if ('tick' in args[0]) {
Expand Down

0 comments on commit b9603d4

Please sign in to comment.