Skip to content

Commit

Permalink
Update Wed Sep 25 06:30:44 UTC 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
security-deriv committed Sep 25, 2024
1 parent 2e2a4e6 commit 3bb9bc2
Show file tree
Hide file tree
Showing 3 changed files with 2,991 additions and 2,712 deletions.
86 changes: 44 additions & 42 deletions hub.deriv.com/PartnersHub/scripts/PartnersHub.index.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,47 @@
require(["tslib"], function (tslib) {
require(["@outsystems/runtime-core-js", "PartnersHub.appDefinition", "@outsystems/runtime-core-js/debugger"], function (OSRuntimeCore, PartnersHubAppDefinition, NullDebugger) {
var OS = OSRuntimeCore;
if(OS.Navigation.ensureRequestSecurity()) {
return;
}
require(["tslib"], function(tslib) {
require(["@outsystems/runtime-core-js", "PartnersHub.appDefinition", "@outsystems/runtime-core-js/debugger"], function(OSRuntimeCore, PartnersHubAppDefinition, NullDebugger) {
var OS = OSRuntimeCore;
if (OS.Navigation.ensureRequestSecurity()) {
return;
}

Promise.all([OS.Application.default.initialize(PartnersHubAppDefinition, OS.Interfaces.Application.InitializationType.Full, new OS.Format.DateTimeFormatInfo("yyyy-MM-dd", "HH:mm:ss"), new OS.Format.NumberFormatInfo(".", ""), function () {
return Promise.all(["scripts/PartnersHub.yupumd.js"].map(function (script) {
return OS.SystemActions.requireScript(script);
}));
}).then(function (success) {
if(success) {
function initGlobalExceptionHandler() {
return new Promise(function (resolve) {
require(["PartnersHub.Common.controller"], function (exceptionModule) {
OS.Application.default.registerDefaultErrorHandler(function () {
return function (error, callContext) {
return exceptionModule.default.handleError(error, callContext);
};
});
resolve();
});
});
}
function initView() {
return OS.Flow.promise(function (resolve, reject) {
require(["@outsystems/runtime-view-js"], function (OSView) {
try {OSView.Router.load(OS.Application.default);
resolve();
} catch (error) {
reject(error);
}
Promise.all([OS.Application.default.initialize(PartnersHubAppDefinition, OS.Interfaces.Application.InitializationType.Full, new OS.Format.DateTimeFormatInfo("yyyy-MM-dd", "HH:mm:ss"), new OS.Format.NumberFormatInfo(".", ""), function() {
return Promise.all(["scripts/PartnersHub.yupumd.js"].map(function(script) {
return OS.SystemActions.requireScript(script);
}));
}).then(function(success) {
if (success) {
function initGlobalExceptionHandler() {
return new Promise(function(resolve) {
require(["PartnersHub.Common.controller"], function(exceptionModule) {
OS.Application.default.registerDefaultErrorHandler(function() {
return function(error, callContext) {
return exceptionModule.default.handleError(error, callContext);
};
});
resolve();
});
});
}

});
});
}
return initGlobalExceptionHandler().then(initView);
}
function initView() {
return OS.Flow.promise(function(resolve, reject) {
require(["@outsystems/runtime-view-js"], function(OSView) {
try {
OSView.Router.load(OS.Application.default);
resolve();
} catch (error) {
reject(error);
}

})]).catch(function (error) {
OS.ErrorHandling.handleError(error);
});
});
});
});
});
}
return initGlobalExceptionHandler().then(initView);
}

})]).catch(function(error) {
OS.ErrorHandling.handleError(error);
});
});
});
Loading

0 comments on commit 3bb9bc2

Please sign in to comment.