@web3auth/no-modal 5.0.0-alpha.0 → 5.0.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/README.md +4 -4
- package/dist/noModal.cjs.js +6 -0
- package/dist/noModal.cjs.js.map +1 -1
- package/dist/noModal.esm.js +7 -1
- package/dist/noModal.esm.js.map +1 -1
- package/dist/noModal.umd.min.js +1 -1
- package/dist/noModal.umd.min.js.map +1 -1
- package/package.json +6 -6
- package/src/noModal.ts +12 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@web3auth/no-modal",
|
|
3
|
-
"version": "5.0.0
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Multi chain wallet aggregator for web3Auth",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web3Auth/no-modal",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"@babel/runtime": "^7.x"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@toruslabs/openlogin": "^3.1
|
|
39
|
-
"@toruslabs/openlogin-jrpc": "^3.
|
|
40
|
-
"@web3auth/base": "^5.0.0
|
|
41
|
-
"@web3auth/base-plugin": "^5.0.0
|
|
38
|
+
"@toruslabs/openlogin": "^3.2.1",
|
|
39
|
+
"@toruslabs/openlogin-jrpc": "^3.2.0",
|
|
40
|
+
"@web3auth/base": "^5.0.0",
|
|
41
|
+
"@web3auth/base-plugin": "^5.0.0"
|
|
42
42
|
},
|
|
43
43
|
"lint-staged": {
|
|
44
44
|
"!(*d).ts": [
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"bugs": {
|
|
57
57
|
"url": "https://github.com/Web3Auth/Web3Auth/issues"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "8702657a42f44ff5ebc0a4be796e68a10f506dde"
|
|
60
60
|
}
|
package/src/noModal.ts
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
UserAuthInfo,
|
|
18
18
|
UserInfo,
|
|
19
19
|
WALLET_ADAPTER_TYPE,
|
|
20
|
+
WALLET_ADAPTERS,
|
|
20
21
|
WalletInitializationError,
|
|
21
22
|
WalletLoginError,
|
|
22
23
|
Web3AuthError,
|
|
@@ -157,6 +158,17 @@ export class Web3AuthNoModal extends SafeEventEmitter implements IWeb3Auth {
|
|
|
157
158
|
`This wallet adapter belongs to ${adapter.adapterNamespace} which is incompatible with currently used namespace: ${providedChainConfig.chainNamespace}`
|
|
158
159
|
);
|
|
159
160
|
|
|
161
|
+
if (adapter.name === WALLET_ADAPTERS.WALLET_CONNECT_V2 && this.walletAdapters[WALLET_ADAPTERS.WALLET_CONNECT_V1]) {
|
|
162
|
+
throw WalletInitializationError.invalidParams(
|
|
163
|
+
"Either one of wallet connect v2 or wallet connect v1 can be used, wallet connect v1 is already added to adapter lists."
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
if (adapter.name === WALLET_ADAPTERS.WALLET_CONNECT_V1 && this.walletAdapters[WALLET_ADAPTERS.WALLET_CONNECT_V2]) {
|
|
167
|
+
throw WalletInitializationError.invalidParams(
|
|
168
|
+
"Either one of wallet connect v2 or wallet connect v1 can be used, wallet connect v2 is already added to adapter lists."
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
160
172
|
if (
|
|
161
173
|
adapter.adapterNamespace === ADAPTER_NAMESPACES.MULTICHAIN &&
|
|
162
174
|
adapter.currentChainNamespace &&
|