@web3auth/modal 10.10.0 → 10.11.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/dist/lib.cjs/packages/modal/src/config.js +1 -1
- package/dist/lib.cjs/packages/modal/src/modalManager.js +1 -1
- package/dist/lib.cjs/packages/modal/src/react/context/WalletServicesInnerContext.js +3 -3
- package/dist/lib.cjs/packages/modal/src/react/context/Web3AuthInnerContext.js +10 -10
- package/dist/lib.cjs/packages/modal/src/vue/WalletServicesInnerProvider.js +3 -3
- package/dist/lib.cjs/packages/modal/src/vue/Web3AuthProvider.js +9 -9
- package/dist/lib.esm/packages/modal/src/config.js +1 -1
- package/dist/lib.esm/packages/modal/src/modalManager.js +1 -1
- package/dist/lib.esm/packages/modal/src/react/context/WalletServicesInnerContext.js +3 -3
- package/dist/lib.esm/packages/modal/src/react/context/Web3AuthInnerContext.js +10 -10
- package/dist/lib.esm/packages/modal/src/vue/WalletServicesInnerProvider.js +3 -3
- package/dist/lib.esm/packages/modal/src/vue/Web3AuthProvider.js +9 -9
- package/dist/modal.umd.min.js +1 -1
- package/package.json +3 -3
|
@@ -573,7 +573,7 @@ class Web3Auth extends noModal.Web3AuthNoModal {
|
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
// update connector config
|
|
576
|
-
if ([noModal.CONNECTOR_STATUS.NOT_READY, noModal.CONNECTOR_STATUS.READY, noModal.CONNECTOR_STATUS.CONNECTING, noModal.CONNECTOR_STATUS.CONNECTED].includes(connector.status)) {
|
|
576
|
+
if ([noModal.CONNECTOR_STATUS.NOT_READY, noModal.CONNECTOR_STATUS.READY, noModal.CONNECTOR_STATUS.CONNECTING, noModal.CONNECTOR_STATUS.CONNECTED, noModal.CONNECTOR_STATUS.AUTHORIZING, noModal.CONNECTOR_STATUS.AUTHORIZED].includes(connector.status)) {
|
|
577
577
|
const connectorModalConfig = this.modalConfig.connectors[connectorName];
|
|
578
578
|
connectorsConfig[connectorName] = _objectSpread(_objectSpread({}, connectorModalConfig), {}, {
|
|
579
579
|
isInjected: connector.isInjected,
|
|
@@ -50,9 +50,9 @@ function WalletServicesContextProvider({
|
|
|
50
50
|
}
|
|
51
51
|
return () => {
|
|
52
52
|
if (walletServicesPlugin) {
|
|
53
|
-
walletServicesPlugin.
|
|
54
|
-
walletServicesPlugin.
|
|
55
|
-
walletServicesPlugin.
|
|
53
|
+
walletServicesPlugin.removeListener(noModal.PLUGIN_EVENTS.CONNECTED, connectedListener);
|
|
54
|
+
walletServicesPlugin.removeListener(noModal.PLUGIN_EVENTS.DISCONNECTED, disconnectedListener);
|
|
55
|
+
walletServicesPlugin.removeListener(noModal.PLUGIN_EVENTS.CONNECTING, connectingListener);
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
}, [walletServicesPlugin]);
|
|
@@ -68,7 +68,7 @@ function Web3AuthInnerProvider(params) {
|
|
|
68
68
|
provider.on("chainChanged", handleChainChange);
|
|
69
69
|
return () => {
|
|
70
70
|
if (provider) {
|
|
71
|
-
provider.
|
|
71
|
+
provider.removeListener("chainChanged", handleChainChange);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
}
|
|
@@ -131,15 +131,15 @@ function Web3AuthInnerProvider(params) {
|
|
|
131
131
|
}
|
|
132
132
|
return () => {
|
|
133
133
|
if (web3Auth) {
|
|
134
|
-
web3Auth.
|
|
135
|
-
web3Auth.
|
|
136
|
-
web3Auth.
|
|
137
|
-
web3Auth.
|
|
138
|
-
web3Auth.
|
|
139
|
-
web3Auth.
|
|
140
|
-
web3Auth.
|
|
141
|
-
web3Auth.
|
|
142
|
-
web3Auth.
|
|
134
|
+
web3Auth.removeListener(noModal.CONNECTOR_EVENTS.NOT_READY, notReadyListener);
|
|
135
|
+
web3Auth.removeListener(noModal.CONNECTOR_EVENTS.READY, readyListener);
|
|
136
|
+
web3Auth.removeListener(noModal.CONNECTOR_EVENTS.CONNECTED, connectedListener);
|
|
137
|
+
web3Auth.removeListener(noModal.CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
|
|
138
|
+
web3Auth.removeListener(noModal.CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
|
|
139
|
+
web3Auth.removeListener(noModal.CONNECTOR_EVENTS.CONNECTING, connectingListener);
|
|
140
|
+
web3Auth.removeListener(noModal.CONNECTOR_EVENTS.ERRORED, errorListener);
|
|
141
|
+
web3Auth.removeListener(noModal.CONNECTOR_EVENTS.REHYDRATION_ERROR, rehydrationErrorListener);
|
|
142
|
+
web3Auth.removeListener(noModal.CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
|
|
143
143
|
web3Auth.cleanup();
|
|
144
144
|
}
|
|
145
145
|
};
|
|
@@ -45,9 +45,9 @@ const WalletServicesInnerProvider = vue.defineComponent({
|
|
|
45
45
|
};
|
|
46
46
|
// unregister previous listeners
|
|
47
47
|
if (prevWalletServicesPlugin && newWalletServicesPlugin !== prevWalletServicesPlugin) {
|
|
48
|
-
prevWalletServicesPlugin.
|
|
49
|
-
prevWalletServicesPlugin.
|
|
50
|
-
prevWalletServicesPlugin.
|
|
48
|
+
prevWalletServicesPlugin.removeListener(noModal.PLUGIN_EVENTS.CONNECTED, connectedListener);
|
|
49
|
+
prevWalletServicesPlugin.removeListener(noModal.PLUGIN_EVENTS.DISCONNECTED, disconnectedListener);
|
|
50
|
+
prevWalletServicesPlugin.removeListener(noModal.PLUGIN_EVENTS.CONNECTING, connectingListener);
|
|
51
51
|
}
|
|
52
52
|
if (newWalletServicesPlugin && newWalletServicesPlugin !== prevWalletServicesPlugin) {
|
|
53
53
|
newWalletServicesPlugin.on(noModal.PLUGIN_EVENTS.CONNECTED, connectedListener);
|
|
@@ -120,15 +120,15 @@ const Web3AuthProvider = vue.defineComponent({
|
|
|
120
120
|
};
|
|
121
121
|
// unregister previous listeners
|
|
122
122
|
if (prevWeb3Auth && newWeb3Auth !== prevWeb3Auth) {
|
|
123
|
-
prevWeb3Auth.
|
|
124
|
-
prevWeb3Auth.
|
|
125
|
-
prevWeb3Auth.
|
|
126
|
-
prevWeb3Auth.
|
|
127
|
-
prevWeb3Auth.
|
|
128
|
-
prevWeb3Auth.
|
|
129
|
-
prevWeb3Auth.
|
|
130
|
-
prevWeb3Auth.
|
|
131
|
-
prevWeb3Auth.
|
|
123
|
+
prevWeb3Auth.removeListener(noModal.CONNECTOR_EVENTS.NOT_READY, notReadyListener);
|
|
124
|
+
prevWeb3Auth.removeListener(noModal.CONNECTOR_EVENTS.READY, readyListener);
|
|
125
|
+
prevWeb3Auth.removeListener(noModal.CONNECTOR_EVENTS.CONNECTED, connectedListener);
|
|
126
|
+
prevWeb3Auth.removeListener(noModal.CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
|
|
127
|
+
prevWeb3Auth.removeListener(noModal.CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
|
|
128
|
+
prevWeb3Auth.removeListener(noModal.CONNECTOR_EVENTS.CONNECTING, connectingListener);
|
|
129
|
+
prevWeb3Auth.removeListener(noModal.CONNECTOR_EVENTS.ERRORED, errorListener);
|
|
130
|
+
prevWeb3Auth.removeListener(noModal.CONNECTOR_EVENTS.REHYDRATION_ERROR, errorListener);
|
|
131
|
+
prevWeb3Auth.removeListener(noModal.CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
|
|
132
132
|
}
|
|
133
133
|
if (newWeb3Auth && newWeb3Auth !== prevWeb3Auth) {
|
|
134
134
|
status.value = newWeb3Auth.status;
|
|
@@ -604,7 +604,7 @@ class Web3Auth extends Web3AuthNoModal {
|
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
// update connector config
|
|
607
|
-
if ([CONNECTOR_STATUS.NOT_READY, CONNECTOR_STATUS.READY, CONNECTOR_STATUS.CONNECTING, CONNECTOR_STATUS.CONNECTED].includes(connector.status)) {
|
|
607
|
+
if ([CONNECTOR_STATUS.NOT_READY, CONNECTOR_STATUS.READY, CONNECTOR_STATUS.CONNECTING, CONNECTOR_STATUS.CONNECTED, CONNECTOR_STATUS.AUTHORIZING, CONNECTOR_STATUS.AUTHORIZED].includes(connector.status)) {
|
|
608
608
|
const connectorModalConfig = this.modalConfig.connectors[connectorName];
|
|
609
609
|
connectorsConfig[connectorName] = _objectSpread(_objectSpread({}, connectorModalConfig), {}, {
|
|
610
610
|
isInjected: connector.isInjected,
|
|
@@ -48,9 +48,9 @@ function WalletServicesContextProvider({
|
|
|
48
48
|
}
|
|
49
49
|
return () => {
|
|
50
50
|
if (walletServicesPlugin) {
|
|
51
|
-
walletServicesPlugin.
|
|
52
|
-
walletServicesPlugin.
|
|
53
|
-
walletServicesPlugin.
|
|
51
|
+
walletServicesPlugin.removeListener(PLUGIN_EVENTS.CONNECTED, connectedListener);
|
|
52
|
+
walletServicesPlugin.removeListener(PLUGIN_EVENTS.DISCONNECTED, disconnectedListener);
|
|
53
|
+
walletServicesPlugin.removeListener(PLUGIN_EVENTS.CONNECTING, connectingListener);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
}, [walletServicesPlugin]);
|
|
@@ -66,7 +66,7 @@ function Web3AuthInnerProvider(params) {
|
|
|
66
66
|
provider.on("chainChanged", handleChainChange);
|
|
67
67
|
return () => {
|
|
68
68
|
if (provider) {
|
|
69
|
-
provider.
|
|
69
|
+
provider.removeListener("chainChanged", handleChainChange);
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
}
|
|
@@ -129,15 +129,15 @@ function Web3AuthInnerProvider(params) {
|
|
|
129
129
|
}
|
|
130
130
|
return () => {
|
|
131
131
|
if (web3Auth) {
|
|
132
|
-
web3Auth.
|
|
133
|
-
web3Auth.
|
|
134
|
-
web3Auth.
|
|
135
|
-
web3Auth.
|
|
136
|
-
web3Auth.
|
|
137
|
-
web3Auth.
|
|
138
|
-
web3Auth.
|
|
139
|
-
web3Auth.
|
|
140
|
-
web3Auth.
|
|
132
|
+
web3Auth.removeListener(CONNECTOR_EVENTS.NOT_READY, notReadyListener);
|
|
133
|
+
web3Auth.removeListener(CONNECTOR_EVENTS.READY, readyListener);
|
|
134
|
+
web3Auth.removeListener(CONNECTOR_EVENTS.CONNECTED, connectedListener);
|
|
135
|
+
web3Auth.removeListener(CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
|
|
136
|
+
web3Auth.removeListener(CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
|
|
137
|
+
web3Auth.removeListener(CONNECTOR_EVENTS.CONNECTING, connectingListener);
|
|
138
|
+
web3Auth.removeListener(CONNECTOR_EVENTS.ERRORED, errorListener);
|
|
139
|
+
web3Auth.removeListener(CONNECTOR_EVENTS.REHYDRATION_ERROR, rehydrationErrorListener);
|
|
140
|
+
web3Auth.removeListener(CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
|
|
141
141
|
web3Auth.cleanup();
|
|
142
142
|
}
|
|
143
143
|
};
|
|
@@ -44,9 +44,9 @@ const WalletServicesInnerProvider = defineComponent({
|
|
|
44
44
|
|
|
45
45
|
// unregister previous listeners
|
|
46
46
|
if (prevWalletServicesPlugin && newWalletServicesPlugin !== prevWalletServicesPlugin) {
|
|
47
|
-
prevWalletServicesPlugin.
|
|
48
|
-
prevWalletServicesPlugin.
|
|
49
|
-
prevWalletServicesPlugin.
|
|
47
|
+
prevWalletServicesPlugin.removeListener(PLUGIN_EVENTS.CONNECTED, connectedListener);
|
|
48
|
+
prevWalletServicesPlugin.removeListener(PLUGIN_EVENTS.DISCONNECTED, disconnectedListener);
|
|
49
|
+
prevWalletServicesPlugin.removeListener(PLUGIN_EVENTS.CONNECTING, connectingListener);
|
|
50
50
|
}
|
|
51
51
|
if (newWalletServicesPlugin && newWalletServicesPlugin !== prevWalletServicesPlugin) {
|
|
52
52
|
newWalletServicesPlugin.on(PLUGIN_EVENTS.CONNECTED, connectedListener);
|
|
@@ -120,15 +120,15 @@ const Web3AuthProvider = defineComponent({
|
|
|
120
120
|
|
|
121
121
|
// unregister previous listeners
|
|
122
122
|
if (prevWeb3Auth && newWeb3Auth !== prevWeb3Auth) {
|
|
123
|
-
prevWeb3Auth.
|
|
124
|
-
prevWeb3Auth.
|
|
125
|
-
prevWeb3Auth.
|
|
126
|
-
prevWeb3Auth.
|
|
127
|
-
prevWeb3Auth.
|
|
128
|
-
prevWeb3Auth.
|
|
129
|
-
prevWeb3Auth.
|
|
130
|
-
prevWeb3Auth.
|
|
131
|
-
prevWeb3Auth.
|
|
123
|
+
prevWeb3Auth.removeListener(CONNECTOR_EVENTS.NOT_READY, notReadyListener);
|
|
124
|
+
prevWeb3Auth.removeListener(CONNECTOR_EVENTS.READY, readyListener);
|
|
125
|
+
prevWeb3Auth.removeListener(CONNECTOR_EVENTS.CONNECTED, connectedListener);
|
|
126
|
+
prevWeb3Auth.removeListener(CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
|
|
127
|
+
prevWeb3Auth.removeListener(CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
|
|
128
|
+
prevWeb3Auth.removeListener(CONNECTOR_EVENTS.CONNECTING, connectingListener);
|
|
129
|
+
prevWeb3Auth.removeListener(CONNECTOR_EVENTS.ERRORED, errorListener);
|
|
130
|
+
prevWeb3Auth.removeListener(CONNECTOR_EVENTS.REHYDRATION_ERROR, errorListener);
|
|
131
|
+
prevWeb3Auth.removeListener(CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
|
|
132
132
|
}
|
|
133
133
|
if (newWeb3Auth && newWeb3Auth !== prevWeb3Auth) {
|
|
134
134
|
status.value = newWeb3Auth.status;
|