ouisys-engine 2.1.35 → 2.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,8 +49,6 @@ var _utils = require("./utils");
49
49
 
50
50
  var _strategy = require("../strategy");
51
51
 
52
- var _timers = require("timers");
53
-
54
52
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
55
53
 
56
54
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -85,7 +83,7 @@ function getRedirectUrlAction(_ref) {
85
83
  currentState = store().strategy.currentState;
86
84
 
87
85
  if (!(currentState.type === "ONE_CLICK")) {
88
- _context.next = 38;
86
+ _context.next = 37;
89
87
  break;
90
88
  }
91
89
 
@@ -100,7 +98,7 @@ function getRedirectUrlAction(_ref) {
100
98
  });
101
99
 
102
100
  if (!(isGetRedirectBupperWay == true)) {
103
- _context.next = 14;
101
+ _context.next = 13;
104
102
  break;
105
103
  }
106
104
 
@@ -116,30 +114,28 @@ function getRedirectUrlAction(_ref) {
116
114
  redirect_url: redirectUrl
117
115
  });
118
116
 
119
- window.isAutoFraudScreener = true;
120
-
121
117
  if (autoRedirect == true || window.isAutoFraudScreener === true) {
122
118
  if (process.env.NODE_ENV === "production") {
123
119
  // Wait for Evina to Check Fraud First
124
120
  setInterval(function () {
125
121
  if (window.isEvinaSessionChecked) {
126
- (0, _timers.clearInterval)(_this);
122
+ clearInterval(_this);
127
123
 
128
124
  _strategy.tracker.advancedInFlow('tallyman.v1-one-click', 'click-redirect-url', {
129
125
  redirect_url: redirectUrl
130
126
  });
131
127
 
132
- (0, _timers.setTimeout)(function () {
128
+ setTimeout(function () {
133
129
  window.location.href = redirectUrl;
134
- }, 1000);
130
+ }, 3000);
135
131
  }
136
- }, 2000);
132
+ }, 1000);
137
133
  } else {
138
134
  _strategy.tracker.advancedInFlow('tallyman.v1-one-click', 'click-redirect-url', {
139
135
  redirect_url: redirectUrl
140
136
  });
141
137
 
142
- (0, _timers.setTimeout)(function () {
138
+ setTimeout(function () {
143
139
  window.location.href = redirectUrl;
144
140
  }, 3000);
145
141
  }
@@ -155,12 +151,12 @@ function getRedirectUrlAction(_ref) {
155
151
  });
156
152
  }
157
153
 
158
- _context.next = 29;
154
+ _context.next = 28;
159
155
  break;
160
156
 
161
- case 14:
157
+ case 13:
162
158
  if (!(subscription_url && subscription_url != null)) {
163
- _context.next = 18;
159
+ _context.next = 17;
164
160
  break;
165
161
  }
166
162
 
@@ -172,9 +168,9 @@ function getRedirectUrlAction(_ref) {
172
168
  }
173
169
  }));
174
170
 
175
- case 18:
171
+ case 17:
176
172
  if (!(redirect_url && redirect_url != null)) {
177
- _context.next = 23;
173
+ _context.next = 22;
178
174
  break;
179
175
  }
180
176
 
@@ -192,13 +188,13 @@ function getRedirectUrlAction(_ref) {
192
188
  }
193
189
  }));
194
190
 
195
- case 23:
196
- _context.next = 25;
191
+ case 22:
192
+ _context.next = 24;
197
193
  return (0, _utils.getRedirectUrl)(window, config, _objectSpread(_objectSpread({}, currentState.result.operator && {
198
194
  operator: currentState.result.operator
199
195
  }), extraParams));
200
196
 
201
- case 25:
197
+ case 24:
202
198
  _yield$getRedirectUrl = _context.sent;
203
199
  _redirect_url = _yield$getRedirectUrl.redirect_url;
204
200
 
@@ -224,12 +220,12 @@ function getRedirectUrlAction(_ref) {
224
220
  });
225
221
  }
226
222
 
227
- case 29:
228
- _context.next = 36;
223
+ case 28:
224
+ _context.next = 35;
229
225
  break;
230
226
 
231
- case 31:
232
- _context.prev = 31;
227
+ case 30:
228
+ _context.prev = 30;
233
229
  _context.t0 = _context["catch"](3);
234
230
  console.warn(_context.t0);
235
231
  console.log("Falling back to bupper");
@@ -246,11 +242,11 @@ function getRedirectUrlAction(_ref) {
246
242
  });
247
243
  }
248
244
 
249
- case 36:
250
- _context.next = 40;
245
+ case 35:
246
+ _context.next = 39;
251
247
  break;
252
248
 
253
- case 38:
249
+ case 37:
254
250
  dispatch({
255
251
  type: "GET_REDIRECT_URL",
256
252
  payload: {
@@ -262,12 +258,12 @@ function getRedirectUrlAction(_ref) {
262
258
  });
263
259
  throw "Unexpected state";
264
260
 
265
- case 40:
261
+ case 39:
266
262
  case "end":
267
263
  return _context.stop();
268
264
  }
269
265
  }
270
- }, _callee, null, [[3, 31]]);
266
+ }, _callee, null, [[3, 30]]);
271
267
  }));
272
268
 
273
269
  return function (_x, _x2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ouisys-engine",
3
- "version": "2.1.35",
3
+ "version": "2.1.38",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "directories": "dist dev-tools",
@@ -6,7 +6,6 @@ import { AppThunk } from "../../common-types/AppThunk";
6
6
  import { getRedirectUrl, getRedirectUrlBupperWay, mockedRedirectUrlSuccessState, mockedSubscribeAjaxState, subscribe } from "./utils";
7
7
  import { genericHandler, tracker } from "../strategy";
8
8
  import { IHash } from "../strategy/StrategyTypes";
9
- import { clearInterval, setTimeout } from "timers";
10
9
 
11
10
 
12
11
 
@@ -37,7 +36,6 @@ export function getRedirectUrlAction({extraParams, autoRedirect = false, isGetRe
37
36
 
38
37
 
39
38
  tracker.customEvent('Flow', 'advance-auto', 'redirect-success', {redirect_url:redirectUrl})
40
- window.isAutoFraudScreener = true
41
39
  if(autoRedirect == true || window.isAutoFraudScreener === true){
42
40
 
43
41
  if(process.env.NODE_ENV === "production"){
@@ -48,9 +46,9 @@ export function getRedirectUrlAction({extraParams, autoRedirect = false, isGetRe
48
46
  tracker.advancedInFlow('tallyman.v1-one-click', 'click-redirect-url', {redirect_url:redirectUrl});
49
47
  setTimeout(() => {
50
48
  window.location.href = redirectUrl;
51
- }, 1000);
49
+ }, 3000);
52
50
  }
53
- }, 2000);
51
+ }, 1000);
54
52
  }else{
55
53
  tracker.advancedInFlow('tallyman.v1-one-click', 'click-redirect-url', {redirect_url:redirectUrl});
56
54
  setTimeout(() => {