esoftplay 0.0.140-c → 0.0.140-d

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.
Files changed (2) hide show
  1. package/error.ts +4 -5
  2. package/package.json +1 -1
package/error.ts CHANGED
@@ -1,9 +1,9 @@
1
- import AsyncStorage from '@react-native-async-storage/async-storage';
2
1
  import Constants from 'expo-constants';
3
2
  import { Platform } from 'react-native';
4
3
  import { LibCurl } from './cache/lib/curl/import';
5
4
  import { UserClass } from './cache/user/class/import';
6
5
  import esp from './esp';
6
+ import FastStorage from './mmkv';
7
7
  import { default as UserRoutes } from './modules/user/routes';
8
8
  let pack = require('../../package.json');
9
9
  let app = require('../../app.json');
@@ -35,7 +35,7 @@ export function setError(error?: any) {
35
35
  time: getTime()
36
36
  };
37
37
  try {
38
- AsyncStorage.setItem(`${config?.domain}error`, JSON.stringify(_e));
38
+ FastStorage.setItem(`${config?.domain}error`, JSON.stringify(_e));
39
39
  } catch (e) {
40
40
  console.error(e);
41
41
  }
@@ -87,7 +87,6 @@ export function sendTm(message: string, chat_id?: string, bot?: string, res?: (r
87
87
  let config = esp?.config?.()
88
88
  _chatids = Object.values(config?.errorReport?.telegramIds)
89
89
  }
90
- console.log(_chatids)
91
90
  _chatids.forEach((cid: string) => {
92
91
  let post = {
93
92
  text: message,
@@ -101,7 +100,7 @@ export function sendTm(message: string, chat_id?: string, bot?: string, res?: (r
101
100
 
102
101
  export function getError() {
103
102
  let config = esp?.config?.()
104
- AsyncStorage.getItem(config?.domain + 'error').then((e: any) => {
103
+ FastStorage.getItem(config?.domain + 'error').then((e: any) => {
105
104
  if (e) {
106
105
  let _e = JSON.parse(e)
107
106
  let msg = [
@@ -137,7 +136,7 @@ export function getError() {
137
136
  });
138
137
  }
139
138
  // });
140
- AsyncStorage.removeItem(config.domain + 'error')
139
+ FastStorage.removeItem(config.domain + 'error')
141
140
  }
142
141
  })
143
142
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.140-c",
3
+ "version": "0.0.140-d",
4
4
  "description": "embedding data from esoftplay framework (web based) into mobile app",
5
5
  "main": "cache/index.js",
6
6
  "types": "../../index.d.ts",