@web3auth/modal 10.9.1 → 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.
Files changed (98) hide show
  1. package/dist/lib.cjs/packages/modal/src/config.js +1 -1
  2. package/dist/lib.cjs/packages/modal/src/modalManager.js +27 -9
  3. package/dist/lib.cjs/packages/modal/src/react/context/WalletServicesInnerContext.js +4 -4
  4. package/dist/lib.cjs/packages/modal/src/react/context/Web3AuthInnerContext.js +25 -10
  5. package/dist/lib.cjs/packages/modal/src/react/hooks/useIdentityToken.js +7 -3
  6. package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3Auth.js +2 -0
  7. package/dist/lib.cjs/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +5 -3
  8. package/dist/lib.cjs/packages/modal/src/ui/components/CircularLoader/CircularLoader.js +88 -0
  9. package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +2 -2
  10. package/dist/lib.cjs/packages/modal/src/ui/components/Loader/Loader.js +67 -5
  11. package/dist/lib.cjs/packages/modal/src/ui/components/Root/Root.js +8 -2
  12. package/dist/lib.cjs/packages/modal/src/ui/components/Widget/Widget.js +18 -5
  13. package/dist/lib.cjs/packages/modal/src/ui/css/index.css.js +1 -1
  14. package/dist/lib.cjs/packages/modal/src/ui/i18n/english.json.js +3 -0
  15. package/dist/lib.cjs/packages/modal/src/ui/i18n/french.json.js +3 -0
  16. package/dist/lib.cjs/packages/modal/src/ui/i18n/german.json.js +3 -0
  17. package/dist/lib.cjs/packages/modal/src/ui/i18n/japanese.json.js +3 -0
  18. package/dist/lib.cjs/packages/modal/src/ui/i18n/korean.json.js +3 -0
  19. package/dist/lib.cjs/packages/modal/src/ui/i18n/mandarin.json.js +3 -0
  20. package/dist/lib.cjs/packages/modal/src/ui/i18n/portuguese.json.js +3 -0
  21. package/dist/lib.cjs/packages/modal/src/ui/i18n/spanish.json.js +3 -0
  22. package/dist/lib.cjs/packages/modal/src/ui/i18n/turkish.json.js +3 -0
  23. package/dist/lib.cjs/packages/modal/src/ui/interfaces.js +3 -1
  24. package/dist/lib.cjs/packages/modal/src/ui/loginModal.js +26 -2
  25. package/dist/lib.cjs/packages/modal/src/vue/WalletServicesInnerProvider.js +4 -4
  26. package/dist/lib.cjs/packages/modal/src/vue/Web3AuthProvider.js +21 -11
  27. package/dist/lib.cjs/packages/modal/src/vue/composables/useCheckout.js +1 -0
  28. package/dist/lib.cjs/packages/modal/src/vue/composables/useEnableMFA.js +1 -0
  29. package/dist/lib.cjs/packages/modal/src/vue/composables/useFunding.js +1 -0
  30. package/dist/lib.cjs/packages/modal/src/vue/composables/useIdentityToken.js +10 -3
  31. package/dist/lib.cjs/packages/modal/src/vue/composables/useManageMFA.js +1 -0
  32. package/dist/lib.cjs/packages/modal/src/vue/composables/useReceive.js +1 -0
  33. package/dist/lib.cjs/packages/modal/src/vue/composables/useSwap.js +1 -0
  34. package/dist/lib.cjs/packages/modal/src/vue/composables/useSwitchChain.js +1 -0
  35. package/dist/lib.cjs/packages/modal/src/vue/composables/useWalletConnectScanner.js +1 -0
  36. package/dist/lib.cjs/packages/modal/src/vue/composables/useWalletUI.js +1 -0
  37. package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthConnect.js +2 -0
  38. package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthDisconnect.js +1 -0
  39. package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthUser.js +1 -0
  40. package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSignAndSendTransaction.js +1 -0
  41. package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSignMessage.js +1 -0
  42. package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSignTransaction.js +1 -0
  43. package/dist/lib.cjs/types/modalManager.d.ts +1 -0
  44. package/dist/lib.cjs/types/ui/components/BottomSheet/BottomSheet.d.ts +1 -1
  45. package/dist/lib.cjs/types/ui/components/BottomSheet/BottomSheet.type.d.ts +2 -0
  46. package/dist/lib.cjs/types/ui/components/CircularLoader/CircularLoader.d.ts +3 -0
  47. package/dist/lib.cjs/types/ui/components/CircularLoader/CircularLoader.type.d.ts +19 -0
  48. package/dist/lib.cjs/types/ui/components/CircularLoader/index.d.ts +2 -0
  49. package/dist/lib.cjs/types/ui/components/Loader/Loader.type.d.ts +8 -0
  50. package/dist/lib.cjs/types/ui/components/Root/Root.type.d.ts +5 -1
  51. package/dist/lib.cjs/types/ui/components/Widget/Widget.type.d.ts +5 -1
  52. package/dist/lib.cjs/types/ui/interfaces.d.ts +7 -1
  53. package/dist/lib.cjs/types/ui/loginModal.d.ts +1 -0
  54. package/dist/lib.cjs/types/vue/interfaces.d.ts +1 -0
  55. package/dist/lib.esm/packages/modal/src/config.js +1 -1
  56. package/dist/lib.esm/packages/modal/src/modalManager.js +28 -10
  57. package/dist/lib.esm/packages/modal/src/react/context/WalletServicesInnerContext.js +5 -5
  58. package/dist/lib.esm/packages/modal/src/react/context/Web3AuthInnerContext.js +25 -10
  59. package/dist/lib.esm/packages/modal/src/react/hooks/useIdentityToken.js +7 -3
  60. package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3Auth.js +2 -0
  61. package/dist/lib.esm/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +5 -3
  62. package/dist/lib.esm/packages/modal/src/ui/components/CircularLoader/CircularLoader.js +86 -0
  63. package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +2 -2
  64. package/dist/lib.esm/packages/modal/src/ui/components/Loader/Loader.js +68 -6
  65. package/dist/lib.esm/packages/modal/src/ui/components/Root/Root.js +8 -2
  66. package/dist/lib.esm/packages/modal/src/ui/components/Widget/Widget.js +19 -6
  67. package/dist/lib.esm/packages/modal/src/ui/css/index.css.js +1 -1
  68. package/dist/lib.esm/packages/modal/src/ui/i18n/english.json.js +3 -0
  69. package/dist/lib.esm/packages/modal/src/ui/i18n/french.json.js +3 -0
  70. package/dist/lib.esm/packages/modal/src/ui/i18n/german.json.js +3 -0
  71. package/dist/lib.esm/packages/modal/src/ui/i18n/japanese.json.js +3 -0
  72. package/dist/lib.esm/packages/modal/src/ui/i18n/korean.json.js +3 -0
  73. package/dist/lib.esm/packages/modal/src/ui/i18n/mandarin.json.js +3 -0
  74. package/dist/lib.esm/packages/modal/src/ui/i18n/portuguese.json.js +3 -0
  75. package/dist/lib.esm/packages/modal/src/ui/i18n/spanish.json.js +3 -0
  76. package/dist/lib.esm/packages/modal/src/ui/i18n/turkish.json.js +3 -0
  77. package/dist/lib.esm/packages/modal/src/ui/interfaces.js +3 -1
  78. package/dist/lib.esm/packages/modal/src/ui/loginModal.js +28 -4
  79. package/dist/lib.esm/packages/modal/src/vue/WalletServicesInnerProvider.js +4 -4
  80. package/dist/lib.esm/packages/modal/src/vue/Web3AuthProvider.js +22 -12
  81. package/dist/lib.esm/packages/modal/src/vue/composables/useCheckout.js +2 -1
  82. package/dist/lib.esm/packages/modal/src/vue/composables/useEnableMFA.js +2 -1
  83. package/dist/lib.esm/packages/modal/src/vue/composables/useFunding.js +2 -1
  84. package/dist/lib.esm/packages/modal/src/vue/composables/useIdentityToken.js +11 -4
  85. package/dist/lib.esm/packages/modal/src/vue/composables/useManageMFA.js +2 -1
  86. package/dist/lib.esm/packages/modal/src/vue/composables/useReceive.js +2 -1
  87. package/dist/lib.esm/packages/modal/src/vue/composables/useSwap.js +2 -1
  88. package/dist/lib.esm/packages/modal/src/vue/composables/useSwitchChain.js +2 -1
  89. package/dist/lib.esm/packages/modal/src/vue/composables/useWalletConnectScanner.js +2 -1
  90. package/dist/lib.esm/packages/modal/src/vue/composables/useWalletUI.js +2 -1
  91. package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthConnect.js +3 -1
  92. package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthDisconnect.js +2 -1
  93. package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthUser.js +2 -1
  94. package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSignAndSendTransaction.js +2 -1
  95. package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSignMessage.js +2 -1
  96. package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSignTransaction.js +2 -1
  97. package/dist/modal.umd.min.js +1 -1
  98. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import { ANALYTICS_INTEGRATION_TYPE, CONNECTOR_EVENTS, Web3AuthContextKey, CONNECTOR_STATUS, WalletInitializationError } from '@web3auth/no-modal';
1
+ import { ANALYTICS_INTEGRATION_TYPE, log, CONNECTOR_EVENTS, Web3AuthContextKey, CONNECTOR_STATUS, WalletInitializationError } from '@web3auth/no-modal';
2
2
  import { defineComponent, h, shallowRef, ref, watch, provide } from 'vue';
3
3
  import { Web3Auth } from '../modalManager.js';
4
4
  import { WalletServicesInnerProvider } from './WalletServicesInnerProvider.js';
@@ -16,6 +16,7 @@ const Web3AuthProvider = defineComponent({
16
16
  const provider = ref(null);
17
17
  const isMFAEnabled = ref(false);
18
18
  const status = ref(null);
19
+ const isAuthorized = ref(false);
19
20
  const isInitializing = ref(false);
20
21
  const initError = ref(null);
21
22
  const isInitialized = ref(false);
@@ -32,6 +33,7 @@ const Web3AuthProvider = defineComponent({
32
33
  provider.value = null;
33
34
  isMFAEnabled.value = false;
34
35
  isConnected.value = false;
36
+ isAuthorized.value = false;
35
37
  status.value = null;
36
38
  };
37
39
  onInvalidate(() => {
@@ -66,6 +68,7 @@ const Web3AuthProvider = defineComponent({
66
68
  signal: controller.signal
67
69
  });
68
70
  } catch (error) {
71
+ log.error("Error initializing web3auth", error);
69
72
  initError.value = error;
70
73
  } finally {
71
74
  isInitializing.value = false;
@@ -96,15 +99,19 @@ const Web3AuthProvider = defineComponent({
96
99
  isConnected.value = false;
97
100
  provider.value = null;
98
101
  isMFAEnabled.value = false;
102
+ isAuthorized.value = false;
99
103
  };
100
104
  const connectingListener = () => {
101
105
  status.value = web3Auth.value.status;
102
106
  };
103
107
  const errorListener = () => {
104
108
  status.value = web3Auth.value.status;
105
- if (isConnected.value) {
106
- isConnected.value = false;
107
- provider.value = null;
109
+ };
110
+ const authorizedListener = () => {
111
+ status.value = web3Auth.value.status;
112
+ if (web3Auth.value.status === CONNECTOR_STATUS.AUTHORIZED) {
113
+ isConnected.value = true;
114
+ isAuthorized.value = true;
108
115
  }
109
116
  };
110
117
  const mfaEnabledListener = () => {
@@ -113,14 +120,15 @@ const Web3AuthProvider = defineComponent({
113
120
 
114
121
  // unregister previous listeners
115
122
  if (prevWeb3Auth && newWeb3Auth !== prevWeb3Auth) {
116
- prevWeb3Auth.off(CONNECTOR_EVENTS.NOT_READY, notReadyListener);
117
- prevWeb3Auth.off(CONNECTOR_EVENTS.READY, readyListener);
118
- prevWeb3Auth.off(CONNECTOR_EVENTS.CONNECTED, connectedListener);
119
- prevWeb3Auth.off(CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
120
- prevWeb3Auth.off(CONNECTOR_EVENTS.CONNECTING, connectingListener);
121
- prevWeb3Auth.off(CONNECTOR_EVENTS.ERRORED, errorListener);
122
- prevWeb3Auth.off(CONNECTOR_EVENTS.REHYDRATION_ERROR, errorListener);
123
- prevWeb3Auth.off(CONNECTOR_EVENTS.MFA_ENABLED, mfaEnabledListener);
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);
124
132
  }
125
133
  if (newWeb3Auth && newWeb3Auth !== prevWeb3Auth) {
126
134
  status.value = newWeb3Auth.status;
@@ -128,6 +136,7 @@ const Web3AuthProvider = defineComponent({
128
136
  newWeb3Auth.on(CONNECTOR_EVENTS.NOT_READY, notReadyListener);
129
137
  newWeb3Auth.on(CONNECTOR_EVENTS.READY, readyListener);
130
138
  newWeb3Auth.on(CONNECTOR_EVENTS.CONNECTED, connectedListener);
139
+ newWeb3Auth.on(CONNECTOR_EVENTS.AUTHORIZED, authorizedListener);
131
140
  newWeb3Auth.on(CONNECTOR_EVENTS.DISCONNECTED, disconnectedListener);
132
141
  newWeb3Auth.on(CONNECTOR_EVENTS.CONNECTING, connectingListener);
133
142
  newWeb3Auth.on(CONNECTOR_EVENTS.ERRORED, errorListener);
@@ -140,6 +149,7 @@ const Web3AuthProvider = defineComponent({
140
149
  provide(Web3AuthContextKey, {
141
150
  web3Auth,
142
151
  isConnected,
152
+ isAuthorized,
143
153
  isInitialized,
144
154
  provider,
145
155
  status,
@@ -1,4 +1,4 @@
1
- import { WalletServicesPluginError } from '@web3auth/no-modal';
1
+ import { WalletServicesPluginError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
4
4
 
@@ -17,6 +17,7 @@ const useCheckout = () => {
17
17
  if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
18
18
  await plugin.value.showCheckout(showCheckoutParams);
19
19
  } catch (err) {
20
+ log.error("Error showing checkout", err);
20
21
  error.value = err;
21
22
  } finally {
22
23
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { WalletInitializationError } from '@web3auth/no-modal';
1
+ import { WalletInitializationError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useWeb3AuthInner } from './useWeb3AuthInner.js';
4
4
 
@@ -15,6 +15,7 @@ const useEnableMFA = () => {
15
15
  loading.value = true;
16
16
  await web3Auth.value.enableMFA();
17
17
  } catch (err) {
18
+ log.error("Error enabling MFA", err);
18
19
  error.value = err;
19
20
  } finally {
20
21
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { WalletServicesPluginError } from '@web3auth/no-modal';
1
+ import { WalletServicesPluginError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
4
4
 
@@ -17,6 +17,7 @@ const useFunding = () => {
17
17
  if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
18
18
  await plugin.value.showFunding(showFundingParams);
19
19
  } catch (err) {
20
+ log.error("Error showing funding", err);
20
21
  error.value = err;
21
22
  } finally {
22
23
  loading.value = false;
@@ -1,11 +1,11 @@
1
- import { WalletInitializationError } from '@web3auth/no-modal';
1
+ import { WalletInitializationError, log } from '@web3auth/no-modal';
2
2
  import { ref, watch } from 'vue';
3
3
  import { useWeb3AuthInner } from './useWeb3AuthInner.js';
4
4
 
5
5
  const useIdentityToken = () => {
6
6
  const {
7
7
  web3Auth,
8
- isConnected
8
+ isAuthorized
9
9
  } = useWeb3AuthInner();
10
10
  const loading = ref(false);
11
11
  const error = ref(null);
@@ -21,15 +21,22 @@ const useIdentityToken = () => {
21
21
  }
22
22
  return result === null || result === void 0 ? void 0 : result.idToken;
23
23
  } catch (err) {
24
+ log.error("Error getting identity token", err);
24
25
  error.value = err;
25
26
  } finally {
26
27
  loading.value = false;
27
28
  }
28
29
  };
29
- watch(isConnected, newIsConnected => {
30
- if (!newIsConnected && token.value) {
30
+ watch(isAuthorized, newIsAuthorized => {
31
+ if (!web3Auth.value) return;
32
+ if (!newIsAuthorized && token.value) {
31
33
  token.value = null;
32
34
  }
35
+ if (newIsAuthorized && !token.value) {
36
+ token.value = web3Auth.value.idToken;
37
+ }
38
+ }, {
39
+ immediate: true
33
40
  });
34
41
  return {
35
42
  loading,
@@ -1,4 +1,4 @@
1
- import { WalletInitializationError } from '@web3auth/no-modal';
1
+ import { WalletInitializationError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useWeb3AuthInner } from './useWeb3AuthInner.js';
4
4
 
@@ -15,6 +15,7 @@ const useManageMFA = () => {
15
15
  loading.value = true;
16
16
  await web3Auth.value.manageMFA();
17
17
  } catch (err) {
18
+ log.error("Error managing MFA", err);
18
19
  error.value = err;
19
20
  } finally {
20
21
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { WalletServicesPluginError } from '@web3auth/no-modal';
1
+ import { WalletServicesPluginError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
4
4
 
@@ -17,6 +17,7 @@ const useReceive = () => {
17
17
  if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
18
18
  await plugin.value.showReceive(showReceiveParams);
19
19
  } catch (err) {
20
+ log.error("Error showing receive", err);
20
21
  error.value = err;
21
22
  } finally {
22
23
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { WalletServicesPluginError } from '@web3auth/no-modal';
1
+ import { WalletServicesPluginError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
4
4
 
@@ -17,6 +17,7 @@ const useSwap = () => {
17
17
  if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
18
18
  await plugin.value.showSwap(showSwapParams);
19
19
  } catch (err) {
20
+ log.error("Error showing swap", err);
20
21
  error.value = err;
21
22
  } finally {
22
23
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { WalletInitializationError } from '@web3auth/no-modal';
1
+ import { WalletInitializationError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useWeb3AuthInner } from './useWeb3AuthInner.js';
4
4
 
@@ -15,6 +15,7 @@ const useSwitchChain = () => {
15
15
  loading.value = true;
16
16
  await web3Auth.value.switchChain(chainParams);
17
17
  } catch (err) {
18
+ log.error("Error switching chain", err);
18
19
  error.value = err;
19
20
  } finally {
20
21
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { WalletServicesPluginError } from '@web3auth/no-modal';
1
+ import { WalletServicesPluginError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
4
4
 
@@ -17,6 +17,7 @@ const useWalletConnectScanner = () => {
17
17
  if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
18
18
  await plugin.value.showWalletConnectScanner(showWalletConnectScannerParams);
19
19
  } catch (err) {
20
+ log.error("Error showing wallet connect scanner", err);
20
21
  error.value = err;
21
22
  } finally {
22
23
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { WalletServicesPluginError } from '@web3auth/no-modal';
1
+ import { WalletServicesPluginError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
4
4
 
@@ -17,6 +17,7 @@ const useWalletUI = () => {
17
17
  if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
18
18
  await plugin.value.showWalletUi(showWalletUiParams);
19
19
  } catch (err) {
20
+ log.error("Error showing wallet UI", err);
20
21
  error.value = err;
21
22
  } finally {
22
23
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { WalletInitializationError } from '@web3auth/no-modal';
1
+ import { WalletInitializationError, log } from '@web3auth/no-modal';
2
2
  import { ref, watch } from 'vue';
3
3
  import { useWeb3AuthInner } from './useWeb3AuthInner.js';
4
4
 
@@ -30,6 +30,7 @@ const useWeb3AuthConnect = () => {
30
30
  connectorName.value = web3Auth.value.connectedConnectorName;
31
31
  return localProvider;
32
32
  } catch (err) {
33
+ log.error("Error connecting", err);
33
34
  error.value = err;
34
35
  return null;
35
36
  } finally {
@@ -45,6 +46,7 @@ const useWeb3AuthConnect = () => {
45
46
  connectorName.value = web3Auth.value.connectedConnectorName;
46
47
  return localProvider;
47
48
  } catch (err) {
49
+ log.error("Error connecting to", err);
48
50
  error.value = err;
49
51
  return null;
50
52
  } finally {
@@ -1,4 +1,4 @@
1
- import { WalletInitializationError } from '@web3auth/no-modal';
1
+ import { WalletInitializationError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useWeb3AuthInner } from './useWeb3AuthInner.js';
4
4
 
@@ -15,6 +15,7 @@ const useWeb3AuthDisconnect = () => {
15
15
  loading.value = true;
16
16
  await web3Auth.value.logout(options);
17
17
  } catch (err) {
18
+ log.error("Error disconnecting", err);
18
19
  error.value = err;
19
20
  } finally {
20
21
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { WalletInitializationError } from '@web3auth/no-modal';
1
+ import { WalletInitializationError, log } from '@web3auth/no-modal';
2
2
  import { ref, watch } from 'vue';
3
3
  import { useWeb3AuthInner } from './useWeb3AuthInner.js';
4
4
 
@@ -21,6 +21,7 @@ const useWeb3AuthUser = () => {
21
21
  userInfo.value = result;
22
22
  return result;
23
23
  } catch (err) {
24
+ log.error("Error getting user info", err);
24
25
  error.value = err;
25
26
  } finally {
26
27
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { WalletInitializationError } from '@web3auth/no-modal';
1
+ import { WalletInitializationError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useSolanaWallet } from './useSolanaWallet.js';
4
4
 
@@ -18,6 +18,7 @@ const useSignAndSendTransaction = () => {
18
18
  data.value = signature;
19
19
  return signature;
20
20
  } catch (err) {
21
+ log.error("Error signing and sending transaction", err);
21
22
  error.value = err;
22
23
  } finally {
23
24
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { WalletInitializationError } from '@web3auth/no-modal';
1
+ import { WalletInitializationError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useSolanaWallet } from './useSolanaWallet.js';
4
4
 
@@ -20,6 +20,7 @@ const useSignMessage = () => {
20
20
  data.value = signature;
21
21
  return signature;
22
22
  } catch (err) {
23
+ log.error("Error signing message", err);
23
24
  error.value = err;
24
25
  } finally {
25
26
  loading.value = false;
@@ -1,4 +1,4 @@
1
- import { WalletInitializationError } from '@web3auth/no-modal';
1
+ import { WalletInitializationError, log } from '@web3auth/no-modal';
2
2
  import { ref } from 'vue';
3
3
  import { useSolanaWallet } from './useSolanaWallet.js';
4
4
 
@@ -18,6 +18,7 @@ const useSignTransaction = () => {
18
18
  data.value = signedTransaction;
19
19
  return signedTransaction;
20
20
  } catch (err) {
21
+ log.error("Error signing transaction", err);
21
22
  error.value = err;
22
23
  } finally {
23
24
  loading.value = false;