feat期权标的白名单:可固定只显示 ETH 或 BTC。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,8 +8,30 @@
|
||||
|
||||
const panelCache = (window.__optionsPanelCache = window.__optionsPanelCache || {});
|
||||
|
||||
const allowedUnderlys = (function () {
|
||||
const raw = String(root.dataset.allowedUnderlys || "ETH,BTC");
|
||||
const list = raw
|
||||
.split(",")
|
||||
.map(function (s) {
|
||||
return String(s || "")
|
||||
.trim()
|
||||
.toUpperCase();
|
||||
})
|
||||
.filter(function (u) {
|
||||
return u === "ETH" || u === "BTC";
|
||||
});
|
||||
return list.length ? list : ["ETH", "BTC"];
|
||||
})();
|
||||
const bootUnderly = (function () {
|
||||
const d = String(root.dataset.defaultUnderly || "ETH")
|
||||
.trim()
|
||||
.toUpperCase();
|
||||
if (allowedUnderlys.indexOf(d) >= 0) return d;
|
||||
return allowedUnderlys[0] || "ETH";
|
||||
})();
|
||||
|
||||
const state = {
|
||||
underlying: root.dataset.defaultUnderly || "ETH",
|
||||
underlying: bootUnderly,
|
||||
optType: "C",
|
||||
moneyFilter: "all",
|
||||
chainView: "list",
|
||||
|
||||
Reference in New Issue
Block a user