Tucsky/aggr

[BUG] Watchlist item drag/drop to chart pane doesn't work

rixbeck opened this issue · 2 comments

Watchlist item drag/drop to chart pane doesn't work

Dragging and drop a market element into any chart pane doesn't work as intended because of data type mismatch error in event handler method.

Envs

  • Affected browsers: any
  • App version: 3.5.0 (master)

Relevant console log

productsService.ts:277 Uncaught (in promise) TypeError: market.match is not a function
    at parseMarket (productsService.ts:277:17)
    at Store2.refreshMarketsListeners (panes.ts:225:38)
    at Array.wrappedActionHandler (vuex.js?v=31fba16a:665:23)
    at Store2.dispatch (vuex.js?v=31fba16a:384:17)
    at Store2.boundDispatch [as dispatch] (vuex.js?v=31fba16a:303:22)
    at local.dispatch (vuex.js?v=31fba16a:603:20)
    at Store2.setMarketsForPane (panes.ts:299:12)
    at Array.wrappedActionHandler (vuex.js?v=31fba16a:665:23)
    at Store2.dispatch (vuex.js?v=31fba16a:384:17)
    at Store2.boundDispatch [as dispatch] (vuex.js?v=31fba16a:303:22)
parseMarket @ productsService.ts:277
refreshMarketsListeners @ panes.ts:225
wrappedActionHandler @ vuex.js?v=31fba16a:665
dispatch @ vuex.js?v=31fba16a:384
boundDispatch @ vuex.js?v=31fba16a:303
local.dispatch @ vuex.js?v=31fba16a:603
setMarketsForPane @ panes.ts:299
wrappedActionHandler @ vuex.js?v=31fba16a:665
dispatch @ vuex.js?v=31fba16a:384
boundDispatch @ vuex.js?v=31fba16a:303
handleDragEnd @ draggableMarketDirective.ts:61
Promise.then (async)
(anonymous) @ vuex.js?v=31fba16a:386
dispatch @ vuex.js?v=31fba16a:385
boundDispatch @ vuex.js?v=31fba16a:303
handleDragEnd @ draggableMarketDirective.ts:61

Description of the bug

Assuming the root of the issue is relevant to refactoring whereas previously may the panes.ts: refreshMarketsListeners() worked with string object to parse exchanges and pairs. But now the parameter markets is Object[].

Screenshots

Peek 2024-03-02 18-43

Thank you for providing such a comprehensive bug report 🤩
Should be good now.

You're fast, man! 🤗
Great job you did in the project, guys!