Demo Mode at UI improved wit localhost allowed
This commit is contained in:
1 parent
40772b09af
commit
00c47b2065
3 files changed
+36
-24
No files matched your search
@@ -44,9 +44,11 @@ function newAlgorithmicTradingFunctionLibraryTradingSessionFunctions() {
|
||||
function runSession(node, resume, callBackFunction) {
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
node.payload.uiObject.setWarningMessage('Superalgos is running is DEMO MODE. This means that you can not RUN Sessions.', 5)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
if (window.location.hostname !== 'localhost') {
|
||||
node.payload.uiObject.setWarningMessage('Superalgos is running is DEMO MODE. This means that you can not RUN Sessions.', 5)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let validationsResult = validations(node)
|
||||
@@ -171,7 +173,7 @@ function newAlgorithmicTradingFunctionLibraryTradingSessionFunctions() {
|
||||
let defaultExchange = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(validationsResult.exchange.payload, 'codeName')
|
||||
let defaultMarket =
|
||||
UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(validationsResult.market.baseAsset.payload.referenceParent.payload, 'codeName')
|
||||
+ '-' +
|
||||
+ '-' +
|
||||
UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(validationsResult.market.quotedAsset.payload.referenceParent.payload, 'codeName')
|
||||
|
||||
let dependencyFilter = UI.projects.foundations.functionLibraries.dependenciesFilter.createDependencyFilter(
|
||||
@@ -204,9 +206,11 @@ function newAlgorithmicTradingFunctionLibraryTradingSessionFunctions() {
|
||||
function stopSession(node, callBackFunction) {
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
node.payload.uiObject.setWarningMessage('Superalgos is running is DEMO MODE. This means that you can not STOP Sessions.', 5)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
if (window.location.hostname !== 'localhost') {
|
||||
node.payload.uiObject.setWarningMessage('Superalgos is running is DEMO MODE. This means that you can not STOP Sessions.', 5)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let validationsResult = validations(node)
|
||||
|
||||
Reference in new issue
Block a user