Skip to content

Commit 94ec151

Browse files
buck54321chappjc
authored andcommitted
set default market view to aggregated depth
1 parent 299f81d commit 94ec151

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

public/js/controllers/market_controller.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const depth = 'depth'
1515
const history = 'history'
1616
const volume = 'volume'
1717
const aggregatedKey = 'aggregated'
18-
const binance = 'binance'
1918
const anHour = '1h'
2019
const minuteMap = {
2120
'30m': 30,
@@ -582,7 +581,7 @@ export default class extends Controller {
582581
settings.chart = depth
583582
}
584583
if (settings.xc == null) {
585-
settings.xc = binance
584+
settings.xc = usesOrderbook(settings.chart) ? aggregatedKey : 'binance'
586585
}
587586
if (settings.stack) {
588587
settings.stack = parseInt(settings.stack)

views/market.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@
147147
data-target="market.chartSelect"
148148
data-action="change->market#changeGraph"
149149
>
150-
<option value="depth" data-target="market.depthOnly">Depth Chart</option>
150+
<option value="depth" data-target="market.depthOnly" selected>Depth Chart</option>
151151
<option value="orders" data-target="market.depthOnly">Order Book</option>
152152
<option value="candlestick" data-target="market.sticksOnly">Candlesticks</option>
153-
<option value="history" data-target="market.sticksOnly" selected>Market History</option>
153+
<option value="history" data-target="market.sticksOnly">Market History</option>
154154
<option value="volume" data-target="market.sticksOnly">Volume</option>
155155

156156
</select>

0 commit comments

Comments
 (0)