@web3auth/modal 7.2.0 → 7.3.0
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/LICENSE +20 -0
- package/dist/modal.cjs.js +10 -0
- package/dist/modal.cjs.js.map +1 -1
- package/dist/modal.esm.js +11 -1
- package/dist/modal.esm.js.map +1 -1
- package/dist/modal.umd.min.js +1 -1
- package/dist/modal.umd.min.js.map +1 -1
- package/package.json +15 -15
- package/src/modalManager.ts +14 -0
package/package.json
CHANGED
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
"url": "https://github.com/Web3Auth/Web3Auth/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@web3auth/base": "^7.2.
|
|
8
|
-
"@web3auth/base-provider": "^7.2.
|
|
9
|
-
"@web3auth/ethereum-provider": "^7.2.
|
|
10
|
-
"@web3auth/metamask-adapter": "^7.2.
|
|
11
|
-
"@web3auth/no-modal": "^7.2.
|
|
12
|
-
"@web3auth/openlogin-adapter": "^7.2.
|
|
13
|
-
"@web3auth/phantom-adapter": "^7.2.
|
|
14
|
-
"@web3auth/solana-provider": "^7.2.
|
|
15
|
-
"@web3auth/torus-evm-adapter": "^7.2.
|
|
16
|
-
"@web3auth/torus-solana-adapter": "^7.2.
|
|
17
|
-
"@web3auth/ui": "^7.2.
|
|
18
|
-
"@web3auth/wallet-connect-v2-adapter": "^7.2.
|
|
7
|
+
"@web3auth/base": "^7.2.1",
|
|
8
|
+
"@web3auth/base-provider": "^7.2.1",
|
|
9
|
+
"@web3auth/ethereum-provider": "^7.2.1",
|
|
10
|
+
"@web3auth/metamask-adapter": "^7.2.1",
|
|
11
|
+
"@web3auth/no-modal": "^7.2.1",
|
|
12
|
+
"@web3auth/openlogin-adapter": "^7.2.1",
|
|
13
|
+
"@web3auth/phantom-adapter": "^7.2.1",
|
|
14
|
+
"@web3auth/solana-provider": "^7.2.1",
|
|
15
|
+
"@web3auth/torus-evm-adapter": "^7.2.1",
|
|
16
|
+
"@web3auth/torus-solana-adapter": "^7.2.1",
|
|
17
|
+
"@web3auth/ui": "^7.2.1",
|
|
18
|
+
"@web3auth/wallet-connect-v2-adapter": "^7.2.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@svgr/webpack": "^8.1.0",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"css-loader": "^6.8.1",
|
|
25
25
|
"postcss-prefix-selector": "^1.16.0",
|
|
26
26
|
"style-loader": "^3.3.3",
|
|
27
|
-
"tailwindcss": "^3.
|
|
27
|
+
"tailwindcss": "^3.4.0",
|
|
28
28
|
"url-loader": "^4.1.1"
|
|
29
29
|
},
|
|
30
30
|
"engines": {
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
},
|
|
71
71
|
"types": "dist/types/index.d.ts",
|
|
72
72
|
"unpkg": "dist/modal.umd.min.js",
|
|
73
|
-
"version": "7.
|
|
74
|
-
"gitHead": "
|
|
73
|
+
"version": "7.3.0",
|
|
74
|
+
"gitHead": "13816a41cfc89de9c9628fe174cf49c221c1cfda"
|
|
75
75
|
}
|
package/src/modalManager.ts
CHANGED
|
@@ -231,6 +231,12 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal {
|
|
|
231
231
|
this.once(ADAPTER_EVENTS.ERRORED, (err: unknown) => {
|
|
232
232
|
return reject(err);
|
|
233
233
|
});
|
|
234
|
+
this.once(LOGIN_MODAL_EVENTS.MODAL_VISIBILITY, (visibility: boolean) => {
|
|
235
|
+
// modal is closed but user is not connected to any wallet.
|
|
236
|
+
if (!visibility && this.status !== ADAPTER_STATUS.CONNECTED) {
|
|
237
|
+
return reject(new Error("User closed the modal"));
|
|
238
|
+
}
|
|
239
|
+
});
|
|
234
240
|
});
|
|
235
241
|
}
|
|
236
242
|
|
|
@@ -314,6 +320,14 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal {
|
|
|
314
320
|
log.error(`Error while disconnecting to wallet connect in core`, error);
|
|
315
321
|
}
|
|
316
322
|
}
|
|
323
|
+
if (
|
|
324
|
+
!visibility &&
|
|
325
|
+
this.status === ADAPTER_STATUS.CONNECTED &&
|
|
326
|
+
(walletConnectStatus === ADAPTER_STATUS.READY || walletConnectStatus === ADAPTER_STATUS.CONNECTING)
|
|
327
|
+
) {
|
|
328
|
+
log.debug("this stops wc adapter from trying to reconnect once proposal expires");
|
|
329
|
+
adapter.status = ADAPTER_STATUS.READY;
|
|
330
|
+
}
|
|
317
331
|
}
|
|
318
332
|
});
|
|
319
333
|
}
|