Skip to content

Commit

Permalink
Fix sales confirmation not working, and add more useful presets
Browse files Browse the repository at this point in the history
  • Loading branch information
JTMCaplin committed Jul 17, 2024
1 parent 0689dd5 commit aa01f3d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions DamJS.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ function enableTrading() {
alert("currently disabled");
}

var RECORD_TYPE_1_CODE = "6c"; //Be warned that the zero is actually a null character
var RECORD_TYPE_1_IMAGE_CODE = "7O"; //Be warned that the zero is actually a null character

define(["lib/react", "DamJSMatcher", "lib/meld"], function (
React,
DamJSMatcher,
Expand Down Expand Up @@ -330,8 +333,9 @@ define(["lib/react", "DamJSMatcher", "lib/meld"], function (
"onUpdate",
function (joinPoint) {
var event = joinPoint.args[0];
var isRecordType1Event = event._getRttpCode().name === "6c";
var isPermissionEvent = event._getRttpCode().name === "6k";
let eventCode = event._getRttpCode().name
var isRecordType1Event = eventCode === RECORD_TYPE_1_CODE || eventCode === RECORD_TYPE_1_IMAGE_CODE
var isPermissionEvent = eventCode === "6k";
if (isRecordType1Event || isPermissionEvent) {
meld.around(
event,
Expand Down
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ var callBack = function () {

var damJS = new DamJS(module.exports);
damJS.addNewMatcher("/");
damJS.addNewMatcher("/PRIVATE/TRADE/FX");
damJS.addNewMatcher("/FXSALES/EURUSD");
damJS.addNewMatcher("/FX/EURUSD");
damJS.addNewMatcher("/FX/GBPUSD");
damJS.addNewMatcher("/FX/USDJPY");
damJS.addNewMatcher("/PRIVATE/SALES/TRADECONFIRMATION");
damJS.addNewMatcher("/PRIVATE/TRADE/MM");
damJS.addNewMatcher("/PRIVATE");
damJS.addNewMatcher("/PRIVATE/FX");
damJS.addNewMatcher("/PRIVATE/TRADE/FX");
damJS.addNewMatcher("/PRIVATE/TRADE/MM");

var newElement = document.createElement("div");
document.body.appendChild(newElement);
Expand Down

0 comments on commit aa01f3d

Please sign in to comment.