From 811356a4feb22b965513b9a89780b5afce5e1ee8 Mon Sep 17 00:00:00 2001 From: Aaron Imming Date: Tue, 11 Feb 2020 10:29:06 +0800 Subject: [PATCH] Verify default strategy --- src/botPage/common/const.js | 1 + src/botPage/view/blockly/index.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/botPage/common/const.js b/src/botPage/common/const.js index 335b0a97da..367771b51f 100644 --- a/src/botPage/common/const.js +++ b/src/botPage/common/const.js @@ -232,6 +232,7 @@ const config = { aid: 'derivbot-248506', api: 'AIzaSyBDYQ7IIgGxM14IeAV5JrtaJNYjxB4A5jo', }, + quick_strategies: ['martingale', 'dalembert'], }; export async function updateConfigCurrencies() { diff --git a/src/botPage/view/blockly/index.js b/src/botPage/view/blockly/index.js index b044b4985c..6d5d6dd323 100644 --- a/src/botPage/view/blockly/index.js +++ b/src/botPage/view/blockly/index.js @@ -28,6 +28,7 @@ import { showDialog } from '../../bot/tools'; import GTM from '../../../common/gtm'; import { parseQueryString } from '../../../common/utils/tools'; import { TrackJSError } from '../logger'; +import config from '../../common/const'; const disableStrayBlocks = () => { const topBlocks = Blockly.mainWorkspace.getTopBlocks(); @@ -374,7 +375,7 @@ export default class _Blockly { let defaultStrat = parseQueryString().strategy; - if (!defaultStrat) { + if (!defaultStrat || !config.quick_strategies.includes(defaultStrat)) { const previousStrat = getPreviousStrat(); if (previousStrat) {