@0xchain/request 1.1.0-beta.33 → 1.1.0-beta.35

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.js CHANGED
@@ -2,7 +2,7 @@ import axios, { isAxiosError, AxiosError } from "axios";
2
2
  import qs from "qs";
3
3
  import jsCookie from "js-cookie";
4
4
  import { logger } from "@0xchain/logger";
5
- import TokenManager, { isTokenExpired, getToken, removeAllToken } from "@0xchain/token";
5
+ import TokenManager, { isTokenExpired, getToken, removeAllToken, setToken } from "@0xchain/token";
6
6
  const isSimplifiedChinese = () => {
7
7
  return /^(zh-hans|zh-cn|zh-sg|zh-my)$/.test(window?.navigator.language.toLowerCase());
8
8
  };
@@ -296,6 +296,7 @@ async function refreshToken(config) {
296
296
  }
297
297
  }).then((res) => {
298
298
  if (res?.data?.data) {
299
+ setToken(res.data.data);
299
300
  return res.data.data;
300
301
  } else {
301
302
  removeAllToken();
@@ -1 +1 @@
1
- {"version":3,"file":"refreshToken.d.ts","sourceRoot":"","sources":["../../src/interceptors/refreshToken.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,0BAA0B,EAAE,MAAM,OAAO,CAAC;AAY1D,wBAA8B,YAAY,CACxC,MAAM,EAAE,0BAA0B,4CAqEnC"}
1
+ {"version":3,"file":"refreshToken.d.ts","sourceRoot":"","sources":["../../src/interceptors/refreshToken.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,0BAA0B,EAAE,MAAM,OAAO,CAAC;AAY1D,wBAA8B,YAAY,CACxC,MAAM,EAAE,0BAA0B,4CAsEnC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xchain/request",
3
- "version": "1.1.0-beta.33",
3
+ "version": "1.1.0-beta.35",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -32,8 +32,8 @@
32
32
  "qs": "6.14.0"
33
33
  },
34
34
  "dependencies": {
35
- "@0xchain/logger": "1.1.0-beta.33",
36
- "@0xchain/token": "1.1.0-beta.33"
35
+ "@0xchain/logger": "1.1.0-beta.35",
36
+ "@0xchain/token": "1.1.0-beta.35"
37
37
  },
38
38
  "nx": {
39
39
  "tags": [