feat: restore legacy named playlist workflows
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
"legacy-fixed-workflow",
|
||||
"legacy-industry-workflow",
|
||||
"legacy-overseas-workflow",
|
||||
"legacy-named-foreign-stock-workflow",
|
||||
"legacy-trading-halt-workflow"
|
||||
]);
|
||||
|
||||
@@ -84,6 +85,24 @@
|
||||
options);
|
||||
break;
|
||||
}
|
||||
case "legacy-named-foreign-stock-workflow": {
|
||||
const action = adapters.overseas.stockActions.find(item => item.id === operator.actionId);
|
||||
if (operator.kind !== "stock" || action?.kind !== "candle" ||
|
||||
!operator.rawSelection || typeof operator.verifiedAt !== "string") return null;
|
||||
const canonical = adapters.overseas.createOverseasStockPlaylistEntry(
|
||||
operator.identity,
|
||||
action.id,
|
||||
options);
|
||||
recreated = {
|
||||
...canonical,
|
||||
operator: Object.freeze({
|
||||
...operator,
|
||||
identity: canonical.operator.identity,
|
||||
movingAverages: canonical.operator.movingAverages
|
||||
})
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "legacy-trading-halt-workflow": {
|
||||
const action = adapters.tradingHalt.getAction(operator.actionId);
|
||||
if (action?.kind !== "candle") return null;
|
||||
|
||||
Reference in New Issue
Block a user