ouisys-engine 2.1.30 → 2.1.31

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.
@@ -27,7 +27,7 @@ export declare type PINEntrySuccess = {
27
27
  msisdn?: string;
28
28
  isAlreadySubscribed?: boolean;
29
29
  };
30
- export declare type PINEntryErrorTypes = "UnknownError" | "TooEarly" | "InvalidPIN" | "UnexpectedState";
30
+ export declare type PINEntryErrorTypes = "UnknownError" | "TooEarly" | "InvalidPIN" | "UnexpectedState" | "SessionBlocked";
31
31
  export declare type IMsisdnSumbitNextData = {
32
32
  actualPIN: string;
33
33
  nextAction: "submitPinAction";
@@ -400,7 +400,7 @@ function submitPinAction(msisdn, pin, extraParams) {
400
400
  _context3.prev = 19;
401
401
  _context3.t0 = _context3["catch"](2);
402
402
  console.error(_context3.t0);
403
- errorType = "InvalidPIN" === _context3.t0.type ? "InvalidPIN" : "UnknownError";
403
+ errorType = _context3.t0.type || "UnknownError";
404
404
 
405
405
  _strategy.tracker.recedeInFlow('tallyman.v1-pin', 'pin-submission-failure', {
406
406
  msisdn: msisdn,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ouisys-engine",
3
- "version": "2.1.30",
3
+ "version": "2.1.31",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "directories": "dist dev-tools",
@@ -30,7 +30,7 @@ export type PINEntryFailure = {
30
30
  error?: Error;
31
31
  };
32
32
  export type PINEntrySuccess = { finalUrl: string, msisdn?:string, isAlreadySubscribed?:boolean, };
33
- export type PINEntryErrorTypes = "UnknownError" | "TooEarly" | "InvalidPIN" | "UnexpectedState";
33
+ export type PINEntryErrorTypes = "UnknownError" | "TooEarly" | "InvalidPIN" | "UnexpectedState" | "SessionBlocked";
34
34
 
35
35
  export type IMsisdnSumbitNextData = {
36
36
  actualPIN: string;
@@ -234,11 +234,8 @@ export function submitPinAction(msisdn:string, pin:string, extraParams?:{[key: s
234
234
  } catch(ex) {
235
235
 
236
236
  console.error(ex)
237
- const errorType: PINEntryErrorTypes =
238
- "InvalidPIN" === ex.type
239
- ? "InvalidPIN"
240
- : "UnknownError";
241
- tracker.recedeInFlow('tallyman.v1-pin', 'pin-submission-failure',{msisdn, pin})
237
+ const errorType: PINEntryErrorTypes = ex.type || "UnknownError";
238
+ tracker.recedeInFlow('tallyman.v1-pin', 'pin-submission-failure',{msisdn, pin})
242
239
 
243
240
  dispatch({
244
241
  type: "PIN_SUBMIT_ERROR",