@arcblock/did-connect-react 3.3.2 → 3.3.3

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.
@@ -117,7 +117,7 @@ function Ae({
117
117
  try {
118
118
  const o = await de({
119
119
  popup: e,
120
- closeTimeout: 0
120
+ closeTimeout: 1500
121
121
  });
122
122
  return o?.response ? o.response?.code : null;
123
123
  } catch (o) {
@@ -1,4 +1,4 @@
1
- const o = "3.3.2", s = {
1
+ const o = "3.3.3", s = {
2
2
  version: o
3
3
  };
4
4
  export {
package/lib/utils.js CHANGED
@@ -172,8 +172,8 @@ const he = (e, { width: o = 680, height: r = 720, name: n = "did-connect:popup",
172
172
  return;
173
173
  }
174
174
  setTimeout(() => {
175
- e.popup?.close(), clearTimeout(i), clearInterval(n), window.removeEventListener("message", t, !1), o(s);
176
- }, e.closeTimeout || 0);
175
+ e.popup?.close(), clearTimeout(i), clearInterval(n), window.removeEventListener("message", t, !1);
176
+ }, e.closeTimeout || 0), o(s);
177
177
  }
178
178
  };
179
179
  i = setTimeout(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/did-connect-react",
3
- "version": "3.3.2",
3
+ "version": "3.3.3",
4
4
  "description": "Client side library to work with DID Connect by ArcBlock.",
5
5
  "keywords": [
6
6
  "react",
@@ -32,10 +32,10 @@
32
32
  "url": "https://github.com/ArcBlock/ux/issues"
33
33
  },
34
34
  "dependencies": {
35
- "@arcblock/bridge": "3.3.2",
35
+ "@arcblock/bridge": "3.3.3",
36
36
  "@arcblock/did": "^1.27.16",
37
- "@arcblock/icons": "3.3.2",
38
- "@arcblock/react-hooks": "3.3.2",
37
+ "@arcblock/icons": "3.3.3",
38
+ "@arcblock/react-hooks": "3.3.3",
39
39
  "@arcblock/ws": "^1.27.16",
40
40
  "@blocklet/constant": "^1.17.6",
41
41
  "@fontsource/lexend": "^5.2.9",
@@ -81,5 +81,5 @@
81
81
  "eslint-plugin-react-hooks": "^4.6.2",
82
82
  "jest": "^29.7.0"
83
83
  },
84
- "gitHead": "0a3aee5692710315a10f418105054a7241301020"
84
+ "gitHead": "915561d073369e7a4e78a45349ae286a05b8c253"
85
85
  }
@@ -184,7 +184,7 @@ function OAuthProvider({
184
184
  try {
185
185
  const data = await runPopup({
186
186
  popup,
187
- closeTimeout: 0,
187
+ closeTimeout: 1500,
188
188
  });
189
189
  if (data?.response) {
190
190
  return data.response?.code;
package/src/utils.js CHANGED
@@ -370,9 +370,9 @@ export const runPopup = (config) => {
370
370
  clearTimeout(timeoutId);
371
371
  clearInterval(popupTimer);
372
372
  window.removeEventListener('message', popupEventListener, false);
373
-
374
- resolve(data);
375
373
  }, config.closeTimeout || 0);
374
+ // 不用等弹窗关闭,可以直接返回结果
375
+ resolve(data);
376
376
  };
377
377
 
378
378
  timeoutId = setTimeout(