Skip to content

Commit 0ca2b99

Browse files
authored
Merge pull request #119 from QuantStrategyLab/fix/worker-dca-platforms
fix(worker): add Schwab/LongBridge to DCA supported platforms
2 parents 74e20e0 + b283694 commit 0ca2b99

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

web/strategy-switch-console/page_asset.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/strategy-switch-console/worker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const DCA_PROFILE_CONFIG = {
108108
ibit_smart_dca: { default_mode: "fixed", default_base_investment_usd: "1000" },
109109
crypto_btc_dca: { default_mode: "fixed", default_base_investment_usd: "100" },
110110
};
111-
const DCA_SUPPORTED_PLATFORMS = new Set(["firstrade", "binance"]);
111+
const DCA_SUPPORTED_PLATFORMS = new Set(["schwab", "firstrade", "longbridge", "binance"]);
112112
const SECURITY_HEADERS = {
113113
"Content-Security-Policy": [
114114
"default-src 'self'",
@@ -1782,7 +1782,7 @@ function isDcaProfile(profile) {
17821782
function assertDcaPlatform(platform, strategyProfile) {
17831783
if (isDcaProfile(strategyProfile) && !DCA_SUPPORTED_PLATFORMS.has(platform)) {
17841784
throw new Error(
1785-
`DCA strategy profiles are only supported on firstrade; got platform=${platform}, strategy_profile=${strategyProfile}`,
1785+
`DCA strategy profiles are not supported on ${platform}; got strategy_profile=${strategyProfile}`,
17861786
);
17871787
}
17881788
}

0 commit comments

Comments
 (0)