@opexa/portal-sdk 0.59.98 → 0.59.100

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.
package/dist/index.cjs CHANGED
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  var objectId = require('@opexa/object-id');
4
- var app = require('@capacitor/app');
5
4
  var core = require('@capacitor/core');
6
5
  var thumbmarkjs = require('@thumbmarkjs/thumbmarkjs');
7
6
  var cookies = require('js-cookie');
@@ -3675,6 +3674,7 @@ var MEMBER_VERIFICATION_REQUEST_FRAGMENT = gql`
3675
3674
  id
3676
3675
  url
3677
3676
  }
3677
+ _selfieImage
3678
3678
  permanentAddress
3679
3679
  currentAddress
3680
3680
  sourceOfIncome
@@ -10328,6 +10328,7 @@ var Transformer = class {
10328
10328
  dateOfBirth: data.dateOfBirth ? new Date(data.dateOfBirth) : void 0,
10329
10329
  idFrontImage: data.idFrontImage ?? void 0,
10330
10330
  selfieImage: data.selfieImage ?? void 0,
10331
+ _selfieImage: data._selfieImage ?? null,
10331
10332
  permanentAddress: data.permanentAddress ?? void 0,
10332
10333
  currentAddress: data.currentAddress ?? void 0,
10333
10334
  sourceOfIncome: data.sourceOfIncome ?? void 0,
@@ -10825,35 +10826,30 @@ var Sdk = class {
10825
10826
  const interval = clamp(input.interval ?? 3e4, 5e3, 6e4);
10826
10827
  let counter = 0;
10827
10828
  let timeout = null;
10828
- let isForeground = true;
10829
10829
  let stopped = false;
10830
- const listener = app.App.addListener("appStateChange", ({ isActive }) => {
10831
- isForeground = isActive;
10832
- });
10833
10830
  const stop = () => {
10834
10831
  stopped = true;
10835
10832
  if (timeout) {
10836
10833
  clearTimeout(timeout);
10837
10834
  timeout = null;
10838
10835
  }
10839
- listener.then((handle) => handle.remove());
10840
10836
  };
10841
10837
  const assignTimeout = () => {
10842
- const duration = counter <= 0 ? interval * 0.5 : interval;
10838
+ const duration = counter <= 0 ? interval * 1.5 : interval;
10843
10839
  return setTimeout(async () => {
10844
- if (isForeground) {
10845
- let res;
10846
- try {
10847
- res = await this.sessionManager.verify();
10848
- } catch {
10849
- res = null;
10850
- }
10851
- if (stopped) return;
10852
- if (res && !res.valid) {
10853
- stop();
10854
- await input.onInvalid(res.reason ?? "INVALID_SESSION");
10855
- return;
10856
- }
10840
+ let res;
10841
+ try {
10842
+ res = await this.sessionManager.verify();
10843
+ } catch {
10844
+ res = null;
10845
+ }
10846
+ if (stopped) {
10847
+ return;
10848
+ }
10849
+ if (res && !res.valid) {
10850
+ stop();
10851
+ await input.onInvalid(res.reason ?? "INVALID_SESSION");
10852
+ return;
10857
10853
  }
10858
10854
  counter += 1;
10859
10855
  timeout = assignTimeout();