@dynamic-labs/sdk-react-core 4.57.1 → 4.58.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 (140) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +12 -12
  5. package/src/index.cjs +2 -0
  6. package/src/index.d.ts +1 -1
  7. package/src/index.js +1 -0
  8. package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.cjs +127 -0
  9. package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.d.ts +1 -1
  10. package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.js +123 -0
  11. package/src/lib/components/Typography/Typography.cjs +1 -0
  12. package/src/lib/components/Typography/Typography.js +1 -0
  13. package/src/lib/components/Typography/Typography.types.d.ts +1 -1
  14. package/src/lib/context/ViewContext/types/index.d.ts +1 -1
  15. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +6 -0
  16. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +6 -0
  17. package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -1
  18. package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -1
  19. package/src/lib/shared/assets/check-circle-filled.cjs +60 -0
  20. package/src/lib/shared/assets/check-circle-filled.js +36 -0
  21. package/src/lib/shared/assets/index.d.ts +16 -12
  22. package/src/lib/shared/assets/knowledge-check-icon.cjs +57 -0
  23. package/src/lib/shared/assets/knowledge-check-icon.js +33 -0
  24. package/src/lib/shared/assets/password-lock-icon.cjs +54 -0
  25. package/src/lib/shared/assets/password-lock-icon.js +30 -0
  26. package/src/lib/shared/assets/secure-action.cjs +54 -0
  27. package/src/lib/shared/assets/secure-action.js +30 -0
  28. package/src/lib/shared/assets/warning-circle-orange.cjs +57 -0
  29. package/src/lib/shared/assets/warning-circle-orange.js +33 -0
  30. package/src/lib/styles/index.shadow.cjs +1 -1
  31. package/src/lib/styles/index.shadow.js +1 -1
  32. package/src/lib/utils/functions/getOauthLoginUrl/getOauthLoginUrl.cjs +4 -1
  33. package/src/lib/utils/functions/getOauthLoginUrl/getOauthLoginUrl.d.ts +5 -1
  34. package/src/lib/utils/functions/getOauthLoginUrl/getOauthLoginUrl.js +4 -1
  35. package/src/lib/utils/functions/reconcilePrimaryWallet/index.d.ts +1 -0
  36. package/src/lib/utils/functions/reconcilePrimaryWallet/reconcilePrimaryWallet.cjs +26 -0
  37. package/src/lib/utils/functions/reconcilePrimaryWallet/reconcilePrimaryWallet.d.ts +2 -0
  38. package/src/lib/utils/functions/reconcilePrimaryWallet/reconcilePrimaryWallet.js +22 -0
  39. package/src/lib/utils/hooks/index.d.ts +1 -0
  40. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.cjs +30 -17
  41. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.d.ts +0 -1
  42. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.js +32 -19
  43. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +21 -12
  44. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.d.ts +2 -1
  45. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +21 -12
  46. package/src/lib/utils/hooks/useRefreshAuth/index.d.ts +1 -0
  47. package/src/lib/utils/hooks/useRefreshAuth/useRefreshAuth.cjs +49 -0
  48. package/src/lib/utils/hooks/useRefreshAuth/useRefreshAuth.d.ts +8 -0
  49. package/src/lib/utils/hooks/useRefreshAuth/useRefreshAuth.js +45 -0
  50. package/src/lib/utils/hooks/useRefreshUser/useRefreshUser.cjs +13 -23
  51. package/src/lib/utils/hooks/useRefreshUser/useRefreshUser.js +12 -22
  52. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +12 -10
  53. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +13 -11
  54. package/src/lib/utils/hooks/useWalletBackup/cloudProviders.cjs +2 -2
  55. package/src/lib/utils/hooks/useWalletBackup/cloudProviders.js +2 -2
  56. package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.cjs +2 -2
  57. package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.js +2 -2
  58. package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.cjs +2 -2
  59. package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.js +2 -2
  60. package/src/lib/views/BackupUnsuccessfulView/BackupUnsuccessfulView.cjs +1 -1
  61. package/src/lib/views/BackupUnsuccessfulView/BackupUnsuccessfulView.js +1 -1
  62. package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -1
  63. package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -1
  64. package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.cjs +1 -1
  65. package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.js +1 -1
  66. package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -1
  67. package/src/lib/views/EmailVerification/EmailVerification.js +1 -1
  68. package/src/lib/views/ExportSharesView/ExportSharesView.cjs +1 -1
  69. package/src/lib/views/ExportSharesView/ExportSharesView.js +1 -1
  70. package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +1 -1
  71. package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +1 -1
  72. package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.cjs +1 -1
  73. package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.js +1 -1
  74. package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +1 -1
  75. package/src/lib/views/MfaVerificationView/MfaVerificationView.js +1 -1
  76. package/src/lib/views/Passkey/ConfirmPasskeyView/ConfirmPasskeyView.cjs +1 -1
  77. package/src/lib/views/Passkey/ConfirmPasskeyView/ConfirmPasskeyView.js +1 -1
  78. package/src/lib/views/Passkey/SetupPasskeyView/SetupPasskeyView.cjs +1 -1
  79. package/src/lib/views/Passkey/SetupPasskeyView/SetupPasskeyView.js +1 -1
  80. package/src/lib/views/SmsVerification/SmsVerification.cjs +1 -1
  81. package/src/lib/views/SmsVerification/SmsVerification.js +1 -1
  82. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +6 -5
  83. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +6 -5
  84. package/src/lib/views/WaasUpgradeView/WaasUpgradeView.cjs +1 -1
  85. package/src/lib/views/WaasUpgradeView/WaasUpgradeView.js +1 -1
  86. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -1
  87. package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -1
  88. package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.cjs +2 -2
  89. package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.js +2 -2
  90. package/src/lib/views/viewToComponentMap.cjs +2 -0
  91. package/src/lib/views/viewToComponentMap.d.ts +1 -0
  92. package/src/lib/views/viewToComponentMap.js +2 -0
  93. package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.cjs +1 -1
  94. package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.js +1 -1
  95. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +15 -3
  96. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.d.ts +6 -0
  97. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +15 -3
  98. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +1 -1
  99. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -1
  100. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -1
  101. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.cjs +2 -2
  102. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.js +2 -2
  103. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.cjs +31 -10
  104. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.js +31 -10
  105. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +1 -1
  106. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +1 -1
  107. package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.cjs +54 -0
  108. package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.d.ts +7 -0
  109. package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.js +50 -0
  110. package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/index.d.ts +2 -0
  111. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/PasswordRequirement.cjs +15 -0
  112. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/PasswordRequirement.d.ts +6 -0
  113. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/PasswordRequirement.js +11 -0
  114. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/SetupPasswordEnterView.cjs +57 -0
  115. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/SetupPasswordEnterView.d.ts +6 -0
  116. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/SetupPasswordEnterView.js +53 -0
  117. package/src/lib/widgets/DynamicWidget/views/SetupPasswordEnterView/index.d.ts +4 -0
  118. package/src/lib/widgets/DynamicWidget/views/SetupPasswordKnowledgeCheckView/SetupPasswordKnowledgeCheckView.cjs +83 -0
  119. package/src/lib/widgets/DynamicWidget/views/SetupPasswordKnowledgeCheckView/SetupPasswordKnowledgeCheckView.d.ts +7 -0
  120. package/src/lib/widgets/DynamicWidget/views/SetupPasswordKnowledgeCheckView/SetupPasswordKnowledgeCheckView.js +79 -0
  121. package/src/lib/widgets/DynamicWidget/views/SetupPasswordKnowledgeCheckView/index.d.ts +2 -0
  122. package/src/lib/widgets/DynamicWidget/views/SetupPasswordSuccessView/SetupPasswordSuccessView.cjs +27 -0
  123. package/src/lib/widgets/DynamicWidget/views/SetupPasswordSuccessView/SetupPasswordSuccessView.d.ts +5 -0
  124. package/src/lib/widgets/DynamicWidget/views/SetupPasswordSuccessView/SetupPasswordSuccessView.js +23 -0
  125. package/src/lib/widgets/DynamicWidget/views/SetupPasswordSuccessView/index.d.ts +2 -0
  126. package/src/lib/widgets/DynamicWidget/views/SetupPasswordTermsView/SetupPasswordTermsView.cjs +37 -0
  127. package/src/lib/widgets/DynamicWidget/views/SetupPasswordTermsView/SetupPasswordTermsView.d.ts +6 -0
  128. package/src/lib/widgets/DynamicWidget/views/SetupPasswordTermsView/SetupPasswordTermsView.js +33 -0
  129. package/src/lib/widgets/DynamicWidget/views/SetupPasswordTermsView/index.d.ts +2 -0
  130. package/src/lib/widgets/DynamicWidget/views/SetupPasswordView/SetupPasswordView.cjs +76 -0
  131. package/src/lib/widgets/DynamicWidget/views/SetupPasswordView/SetupPasswordView.d.ts +6 -0
  132. package/src/lib/widgets/DynamicWidget/views/SetupPasswordView/SetupPasswordView.js +72 -0
  133. package/src/lib/widgets/DynamicWidget/views/SetupPasswordView/index.d.ts +2 -0
  134. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupInfoView.cjs +1 -1
  135. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupInfoView.js +1 -1
  136. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.cjs +1 -1
  137. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.js +1 -1
  138. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.cjs +1 -1
  139. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.js +1 -1
  140. package/src/lib/widgets/DynamicWidget/views/index.d.ts +6 -0
@@ -0,0 +1,45 @@
1
+ 'use client'
2
+ import { __awaiter } from '../../../../../_virtual/_tslib.js';
3
+ import { useCallback } from 'react';
4
+ import { refreshAuth } from '@dynamic-labs-sdk/client';
5
+ import '@dynamic-labs-sdk/client/core';
6
+ import '@dynamic-labs/sdk-api-core';
7
+ import '../../../client/client.js';
8
+ import '../../../config/ApiEndpoint.js';
9
+ import '@dynamic-labs/iconic';
10
+ import '@dynamic-labs/wallet-connector-core';
11
+ import 'react/jsx-runtime';
12
+ import '../../../context/ViewContext/ViewContext.js';
13
+ import '../../../shared/logger.js';
14
+ import '@dynamic-labs/wallet-book';
15
+ import '@dynamic-labs/utils';
16
+ import '../../constants/colors.js';
17
+ import '../../constants/values.js';
18
+ import '../../../shared/consts/index.js';
19
+ import '@dynamic-labs/multi-wallet';
20
+ import 'react-international-phone';
21
+ import '../../../store/state/nonce/nonce.js';
22
+ import '@dynamic-labs/locale';
23
+ import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
24
+ import '../../../store/state/primaryWalletId/primaryWalletId.js';
25
+ import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
26
+ import '../../functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.js';
27
+ import '../../../events/dynamicEvents.js';
28
+ import { getUserProfile } from '../../../client/extension/user/getUserProfile/getUserProfile.js';
29
+ import { reconcilePrimaryWallet } from '../../functions/reconcilePrimaryWallet/reconcilePrimaryWallet.js';
30
+
31
+ /**
32
+ * Refresh auth state
33
+ * @returns A callback function that can be used to refresh the auth state
34
+ */
35
+ const useRefreshAuth = () => useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
36
+ yield refreshAuth();
37
+ const user = getUserProfile();
38
+ if (!(user === null || user === void 0 ? void 0 : user.verifiedCredentials)) {
39
+ throw new Error('useRefreshAuth resulted in an invalid user: no verified credentials found');
40
+ }
41
+ reconcilePrimaryWallet(user);
42
+ return user;
43
+ }), []);
44
+
45
+ export { useRefreshAuth };
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var _tslib = require('../../../../../_virtual/_tslib.cjs');
7
7
  var React = require('react');
8
- require('@dynamic-labs/utils');
9
- require('@dynamic-labs/sdk-api-core');
8
+ var client = require('@dynamic-labs-sdk/client');
9
+ var reconcilePrimaryWallet = require('../../functions/reconcilePrimaryWallet/reconcilePrimaryWallet.cjs');
10
10
  require('@dynamic-labs-sdk/client/core');
11
+ require('@dynamic-labs/sdk-api-core');
11
12
  require('../../../client/client.cjs');
12
- require('@dynamic-labs-sdk/client');
13
13
  require('../../../config/ApiEndpoint.cjs');
14
14
  require('@dynamic-labs/iconic');
15
15
  require('@dynamic-labs/wallet-connector-core');
@@ -17,43 +17,33 @@ require('react/jsx-runtime');
17
17
  require('../../../context/ViewContext/ViewContext.cjs');
18
18
  require('../../../shared/logger.cjs');
19
19
  require('@dynamic-labs/wallet-book');
20
+ require('@dynamic-labs/utils');
20
21
  require('../../constants/colors.cjs');
21
22
  require('../../constants/values.cjs');
22
23
  require('../../../shared/consts/index.cjs');
23
24
  require('@dynamic-labs/multi-wallet');
24
25
  require('react-international-phone');
25
26
  require('../../../store/state/nonce/nonce.cjs');
26
- var updatePrimaryWalletId = require('../../functions/updatePrimaryWalletId/updatePrimaryWalletId.cjs');
27
+ require('@dynamic-labs/locale');
28
+ require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
29
+ require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
27
30
  require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
28
- var dynamicContextProps = require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
29
- var primaryWalletId = require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
30
31
  require('../../functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');
31
32
  require('../../../events/dynamicEvents.cjs');
32
- require('@dynamic-labs/locale');
33
- var user = require('../../../data/api/user/user.cjs');
34
- var findPrimaryWalletVCForUser = require('../../functions/findPrimaryWalletVCForUser/findPrimaryWalletVCForUser.cjs');
33
+ var getUserProfile = require('../../../client/extension/user/getUserProfile/getUserProfile.cjs');
35
34
 
36
35
  /**
37
36
  * Refresh user state
38
37
  * @returns A callback function that can be used to refresh the user state
39
38
  */
40
39
  const useRefreshUser = () => React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
41
- const user$1 = yield user.refreshUserJwt({ environmentId: dynamicContextProps.getEnvironmentId() });
42
- if (!(user$1 === null || user$1 === void 0 ? void 0 : user$1.verifiedCredentials))
40
+ yield client.refreshUser();
41
+ const user = getUserProfile.getUserProfile();
42
+ if (!(user === null || user === void 0 ? void 0 : user.verifiedCredentials)) {
43
43
  throw new Error('useRefreshUser resulted in an invalid user: no verified credentials found');
44
- // Check if the primary wallet is still in this user's VCs
45
- const primaryWalletInUserVCs = user$1.verifiedCredentials.some(({ id }) => id === primaryWalletId.getPrimaryWalletId());
46
- if (primaryWalletInUserVCs)
47
- return user$1;
48
- // Try to set primary wallet ID from available wallets (AA or embedded)
49
- const primaryWalletVC = findPrimaryWalletVCForUser.findPrimaryWalletVCForUser(user$1);
50
- if (primaryWalletVC) {
51
- updatePrimaryWalletId.updatePrimaryWalletId(primaryWalletVC.id);
52
- return user$1;
53
44
  }
54
- // No wallet VCs found, unset the primary wallet
55
- primaryWalletId.setPrimaryWalletId(undefined);
56
- return user$1;
45
+ reconcilePrimaryWallet.reconcilePrimaryWallet(user);
46
+ return user;
57
47
  }), []);
58
48
 
59
49
  exports.useRefreshUser = useRefreshUser;
@@ -1,11 +1,11 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../../../_virtual/_tslib.js';
3
3
  import { useCallback } from 'react';
4
- import '@dynamic-labs/utils';
5
- import '@dynamic-labs/sdk-api-core';
4
+ import { refreshUser } from '@dynamic-labs-sdk/client';
5
+ import { reconcilePrimaryWallet } from '../../functions/reconcilePrimaryWallet/reconcilePrimaryWallet.js';
6
6
  import '@dynamic-labs-sdk/client/core';
7
+ import '@dynamic-labs/sdk-api-core';
7
8
  import '../../../client/client.js';
8
- import '@dynamic-labs-sdk/client';
9
9
  import '../../../config/ApiEndpoint.js';
10
10
  import '@dynamic-labs/iconic';
11
11
  import '@dynamic-labs/wallet-connector-core';
@@ -13,42 +13,32 @@ import 'react/jsx-runtime';
13
13
  import '../../../context/ViewContext/ViewContext.js';
14
14
  import '../../../shared/logger.js';
15
15
  import '@dynamic-labs/wallet-book';
16
+ import '@dynamic-labs/utils';
16
17
  import '../../constants/colors.js';
17
18
  import '../../constants/values.js';
18
19
  import '../../../shared/consts/index.js';
19
20
  import '@dynamic-labs/multi-wallet';
20
21
  import 'react-international-phone';
21
22
  import '../../../store/state/nonce/nonce.js';
22
- import { updatePrimaryWalletId } from '../../functions/updatePrimaryWalletId/updatePrimaryWalletId.js';
23
+ import '@dynamic-labs/locale';
24
+ import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
25
+ import '../../../store/state/primaryWalletId/primaryWalletId.js';
23
26
  import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
24
- import { getEnvironmentId } from '../../../store/state/dynamicContextProps/dynamicContextProps.js';
25
- import { getPrimaryWalletId, setPrimaryWalletId } from '../../../store/state/primaryWalletId/primaryWalletId.js';
26
27
  import '../../functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.js';
27
28
  import '../../../events/dynamicEvents.js';
28
- import '@dynamic-labs/locale';
29
- import { refreshUserJwt } from '../../../data/api/user/user.js';
30
- import { findPrimaryWalletVCForUser } from '../../functions/findPrimaryWalletVCForUser/findPrimaryWalletVCForUser.js';
29
+ import { getUserProfile } from '../../../client/extension/user/getUserProfile/getUserProfile.js';
31
30
 
32
31
  /**
33
32
  * Refresh user state
34
33
  * @returns A callback function that can be used to refresh the user state
35
34
  */
36
35
  const useRefreshUser = () => useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
37
- const user = yield refreshUserJwt({ environmentId: getEnvironmentId() });
38
- if (!(user === null || user === void 0 ? void 0 : user.verifiedCredentials))
36
+ yield refreshUser();
37
+ const user = getUserProfile();
38
+ if (!(user === null || user === void 0 ? void 0 : user.verifiedCredentials)) {
39
39
  throw new Error('useRefreshUser resulted in an invalid user: no verified credentials found');
40
- // Check if the primary wallet is still in this user's VCs
41
- const primaryWalletInUserVCs = user.verifiedCredentials.some(({ id }) => id === getPrimaryWalletId());
42
- if (primaryWalletInUserVCs)
43
- return user;
44
- // Try to set primary wallet ID from available wallets (AA or embedded)
45
- const primaryWalletVC = findPrimaryWalletVCForUser(user);
46
- if (primaryWalletVC) {
47
- updatePrimaryWalletId(primaryWalletVC.id);
48
- return user;
49
40
  }
50
- // No wallet VCs found, unset the primary wallet
51
- setPrimaryWalletId(undefined);
41
+ reconcilePrimaryWallet(user);
52
42
  return user;
53
43
  }), []);
54
44
 
@@ -140,7 +140,7 @@ const socialProviders = [
140
140
  const providersRequiringPkce = ['twitter', 'github'];
141
141
  // Hook to handle common social auth logic (for social linking and social sign in)
142
142
  const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
143
- var _a;
143
+ var _a, _b, _c;
144
144
  const { environmentId, setShowAuthFlow, socialSettings, projectSettings, redirectUrl: defaultRedirectUrl, } = useInternalDynamicContext.useInternalDynamicContext();
145
145
  /**
146
146
  * Represents if the SDK will use a popup or redirect for social auth
@@ -213,7 +213,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
213
213
  verifyFunction: () => apiCall(),
214
214
  });
215
215
  }), [handleError, initAuth, onSettled]);
216
- const completeConnection = React.useCallback((_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ authMode, provider, state, authCode, captchaToken, verifier, telegramAuthToken, forceCreateUser = false, ssoProviderId, }) {
216
+ const completeConnection = React.useCallback((_d) => _tslib.__awaiter(void 0, [_d], void 0, function* ({ authMode, provider, state, authCode, captchaToken, verifier, telegramAuthToken, forceCreateUser = false, ssoProviderId, }) {
217
217
  try {
218
218
  let sessionPublicKey = undefined;
219
219
  utils.tracing.logEvent('oauth', 'completeConnection', utils.tracing.formatObject({
@@ -292,7 +292,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
292
292
  shouldRegisterSessionKeysOnSignin,
293
293
  signInAccount,
294
294
  ]);
295
- const connectWithFarcaster = React.useCallback((authMode_1, _c) => _tslib.__awaiter(void 0, [authMode_1, _c], void 0, function* (authMode, { captchaToken, redirectUrl }) {
295
+ const connectWithFarcaster = React.useCallback((authMode_1, _e) => _tslib.__awaiter(void 0, [authMode_1, _e], void 0, function* (authMode, { captchaToken, redirectUrl }) {
296
296
  let dynamicNonce;
297
297
  try {
298
298
  dynamicNonce = nonce.consumeNonce();
@@ -384,8 +384,8 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
384
384
  shouldRegisterSessionKeysOnSignin,
385
385
  signInAccount,
386
386
  ]);
387
- const connectSocialAccount = React.useCallback((_d) => _tslib.__awaiter(void 0, [_d], void 0, function* ({ authMode, provider, validator, captchaToken, isHeadlessSocialSignIn, payingWithDynamic, triggerFundFromExchangeOnSuccess, redirectUrl, telegramAuthToken, showWidgetAfterConnection, forcePopup, ssoProviderId, }) {
388
- var _e, _f;
387
+ const connectSocialAccount = React.useCallback((_f) => _tslib.__awaiter(void 0, [_f], void 0, function* ({ authMode, provider, validator, captchaToken, isHeadlessSocialSignIn, payingWithDynamic, triggerFundFromExchangeOnSuccess, redirectUrl, telegramAuthToken, showWidgetAfterConnection, forcePopup, ssoProviderId, }) {
388
+ var _g, _h, _j, _k, _l;
389
389
  clearError();
390
390
  setIsProcessing(true);
391
391
  if (!authMode) {
@@ -425,7 +425,8 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
425
425
  state,
426
426
  triggerFundFromExchangeOnSuccess,
427
427
  });
428
- const loginUrlString = getOauthLoginUrl.getOauthLoginUrl((_e = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _e !== void 0 ? _e : [], provider);
428
+ const isGoogleDriveBackupEnabled = (_j = (_h = (_g = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _g === void 0 ? void 0 : _g.waas) === null || _h === void 0 ? void 0 : _h.backupOptions) === null || _j === void 0 ? void 0 : _j.includes(sdkApiCore.WaasBackupOptionsEnum.GoogleDrive);
429
+ const loginUrlString = getOauthLoginUrl.getOauthLoginUrl((_k = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _k !== void 0 ? _k : [], provider, { isGoogleDriveBackupEnabled });
429
430
  if (!loginUrlString) {
430
431
  handleError(provider, types.SocialOAuthErrorCode.NO_OAUTH_URL, `Failed to get login url to connect social account: ${provider}`, { raiseAuthFailure: authMode === 'signin' });
431
432
  return;
@@ -442,7 +443,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
442
443
  try {
443
444
  const effectiveStrategy = forcePopup ? 'popup' : strategy;
444
445
  const authCode = yield utils.Oauth2Service.getOauthCode({
445
- apiProvider: getProviderByType.getProviderByType((_f = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _f !== void 0 ? _f : [], provider),
446
+ apiProvider: getProviderByType.getProviderByType((_l = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _l !== void 0 ? _l : [], provider),
446
447
  getOAuthResultFromApi: () => oauth.getOAuthResult(environmentId, provider, {
447
448
  state,
448
449
  }),
@@ -495,17 +496,18 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
495
496
  onFailed,
496
497
  onSettled,
497
498
  projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers,
499
+ (_b = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.waas) === null || _b === void 0 ? void 0 : _b.backupOptions,
498
500
  strategy,
499
501
  ]);
500
502
  const checkCaptchaAndConnect = React.useCallback((props) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
501
- var _g;
503
+ var _m;
502
504
  if (props.authMode === 'signin' && client.getDynamicClient().user) {
503
505
  throw new utils.DynamicError('User is already logged in');
504
506
  }
505
507
  else if (props.authMode === 'link' && !client.getDynamicClient().user) {
506
508
  throw new utils.DynamicError('User is not logged in');
507
509
  }
508
- if (!((_g = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _g === void 0 ? void 0 : _g.enabled)) {
510
+ if (!((_m = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _m === void 0 ? void 0 : _m.enabled)) {
509
511
  yield connectSocialAccount(props);
510
512
  return;
511
513
  }
@@ -526,7 +528,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
526
528
  setShowAuthFlow,
527
529
  connectSocialAccount,
528
530
  engageCaptcha,
529
- (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _a === void 0 ? void 0 : _a.enabled,
531
+ (_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _c === void 0 ? void 0 : _c.enabled,
530
532
  ]);
531
533
  return React.useMemo(() => ({
532
534
  checkValidProvider,
@@ -1,7 +1,7 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../../../_virtual/_tslib.js';
3
3
  import { useMemo, useState, useCallback } from 'react';
4
- import { ProviderEnum } from '@dynamic-labs/sdk-api-core';
4
+ import { ProviderEnum, WaasBackupOptionsEnum } from '@dynamic-labs/sdk-api-core';
5
5
  import { SocialOAuthErrorCode } from '@dynamic-labs/types';
6
6
  import { SocialAccountAlreadyExistsError, tracing, PlatformService, isMobile, Oauth2Service, DynamicError } from '@dynamic-labs/utils';
7
7
  import { getDynamicClient } from '../../../client/client.js';
@@ -136,7 +136,7 @@ const socialProviders = [
136
136
  const providersRequiringPkce = ['twitter', 'github'];
137
137
  // Hook to handle common social auth logic (for social linking and social sign in)
138
138
  const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
139
- var _a;
139
+ var _a, _b, _c;
140
140
  const { environmentId, setShowAuthFlow, socialSettings, projectSettings, redirectUrl: defaultRedirectUrl, } = useInternalDynamicContext();
141
141
  /**
142
142
  * Represents if the SDK will use a popup or redirect for social auth
@@ -209,7 +209,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
209
209
  verifyFunction: () => apiCall(),
210
210
  });
211
211
  }), [handleError, initAuth$1, onSettled]);
212
- const completeConnection = useCallback((_b) => __awaiter(void 0, [_b], void 0, function* ({ authMode, provider, state, authCode, captchaToken, verifier, telegramAuthToken, forceCreateUser = false, ssoProviderId, }) {
212
+ const completeConnection = useCallback((_d) => __awaiter(void 0, [_d], void 0, function* ({ authMode, provider, state, authCode, captchaToken, verifier, telegramAuthToken, forceCreateUser = false, ssoProviderId, }) {
213
213
  try {
214
214
  let sessionPublicKey = undefined;
215
215
  tracing.logEvent('oauth', 'completeConnection', tracing.formatObject({
@@ -288,7 +288,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
288
288
  shouldRegisterSessionKeysOnSignin,
289
289
  signInAccount,
290
290
  ]);
291
- const connectWithFarcaster = useCallback((authMode_1, _c) => __awaiter(void 0, [authMode_1, _c], void 0, function* (authMode, { captchaToken, redirectUrl }) {
291
+ const connectWithFarcaster = useCallback((authMode_1, _e) => __awaiter(void 0, [authMode_1, _e], void 0, function* (authMode, { captchaToken, redirectUrl }) {
292
292
  let dynamicNonce;
293
293
  try {
294
294
  dynamicNonce = consumeNonce();
@@ -380,8 +380,8 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
380
380
  shouldRegisterSessionKeysOnSignin,
381
381
  signInAccount,
382
382
  ]);
383
- const connectSocialAccount = useCallback((_d) => __awaiter(void 0, [_d], void 0, function* ({ authMode, provider, validator, captchaToken, isHeadlessSocialSignIn, payingWithDynamic, triggerFundFromExchangeOnSuccess, redirectUrl, telegramAuthToken, showWidgetAfterConnection, forcePopup, ssoProviderId, }) {
384
- var _e, _f;
383
+ const connectSocialAccount = useCallback((_f) => __awaiter(void 0, [_f], void 0, function* ({ authMode, provider, validator, captchaToken, isHeadlessSocialSignIn, payingWithDynamic, triggerFundFromExchangeOnSuccess, redirectUrl, telegramAuthToken, showWidgetAfterConnection, forcePopup, ssoProviderId, }) {
384
+ var _g, _h, _j, _k, _l;
385
385
  clearError();
386
386
  setIsProcessing(true);
387
387
  if (!authMode) {
@@ -421,7 +421,8 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
421
421
  state,
422
422
  triggerFundFromExchangeOnSuccess,
423
423
  });
424
- const loginUrlString = getOauthLoginUrl((_e = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _e !== void 0 ? _e : [], provider);
424
+ const isGoogleDriveBackupEnabled = (_j = (_h = (_g = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _g === void 0 ? void 0 : _g.waas) === null || _h === void 0 ? void 0 : _h.backupOptions) === null || _j === void 0 ? void 0 : _j.includes(WaasBackupOptionsEnum.GoogleDrive);
425
+ const loginUrlString = getOauthLoginUrl((_k = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _k !== void 0 ? _k : [], provider, { isGoogleDriveBackupEnabled });
425
426
  if (!loginUrlString) {
426
427
  handleError(provider, SocialOAuthErrorCode.NO_OAUTH_URL, `Failed to get login url to connect social account: ${provider}`, { raiseAuthFailure: authMode === 'signin' });
427
428
  return;
@@ -438,7 +439,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
438
439
  try {
439
440
  const effectiveStrategy = forcePopup ? 'popup' : strategy;
440
441
  const authCode = yield Oauth2Service.getOauthCode({
441
- apiProvider: getProviderByType((_f = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _f !== void 0 ? _f : [], provider),
442
+ apiProvider: getProviderByType((_l = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _l !== void 0 ? _l : [], provider),
442
443
  getOAuthResultFromApi: () => getOAuthResult(environmentId, provider, {
443
444
  state,
444
445
  }),
@@ -491,17 +492,18 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
491
492
  onFailed,
492
493
  onSettled,
493
494
  projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers,
495
+ (_b = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.waas) === null || _b === void 0 ? void 0 : _b.backupOptions,
494
496
  strategy,
495
497
  ]);
496
498
  const checkCaptchaAndConnect = useCallback((props) => __awaiter(void 0, void 0, void 0, function* () {
497
- var _g;
499
+ var _m;
498
500
  if (props.authMode === 'signin' && getDynamicClient().user) {
499
501
  throw new DynamicError('User is already logged in');
500
502
  }
501
503
  else if (props.authMode === 'link' && !getDynamicClient().user) {
502
504
  throw new DynamicError('User is not logged in');
503
505
  }
504
- if (!((_g = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _g === void 0 ? void 0 : _g.enabled)) {
506
+ if (!((_m = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _m === void 0 ? void 0 : _m.enabled)) {
505
507
  yield connectSocialAccount(props);
506
508
  return;
507
509
  }
@@ -522,7 +524,7 @@ const useSocialAuth = ({ onSettled, onError, onFarcasterUrl, }) => {
522
524
  setShowAuthFlow,
523
525
  connectSocialAccount,
524
526
  engageCaptcha,
525
- (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _a === void 0 ? void 0 : _a.enabled,
527
+ (_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _c === void 0 ? void 0 : _c.enabled,
526
528
  ]);
527
529
  return useMemo(() => ({
528
530
  checkValidProvider,
@@ -6,10 +6,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var sdkApiCore = require('@dynamic-labs/sdk-api-core');
8
8
  require('react');
9
- require('@dynamic-labs/iconic');
10
- require('../../../context/ViewContext/ViewContext.cjs');
11
9
  var googleDrive = require('../../../shared/assets/google-drive.cjs');
12
10
  var icloud = require('../../../shared/assets/icloud.cjs');
11
+ require('@dynamic-labs/iconic');
12
+ require('../../../context/ViewContext/ViewContext.cjs');
13
13
  var types = require('./types.cjs');
14
14
 
15
15
  const CLOUD_PROVIDER_CONFIGS = {
@@ -2,10 +2,10 @@
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { ProviderEnum, WaasBackupOptionsEnum } from '@dynamic-labs/sdk-api-core';
4
4
  import 'react';
5
- import '@dynamic-labs/iconic';
6
- import '../../../context/ViewContext/ViewContext.js';
7
5
  import { ReactComponent as SvgGoogleDrive } from '../../../shared/assets/google-drive.js';
8
6
  import { ReactComponent as SvgIcloud } from '../../../shared/assets/icloud.js';
7
+ import '@dynamic-labs/iconic';
8
+ import '../../../context/ViewContext/ViewContext.js';
9
9
  import { CloudBackupProvider } from './types.js';
10
10
 
11
11
  const CLOUD_PROVIDER_CONFIGS = {
@@ -95,7 +95,7 @@ require('../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
95
95
  require('../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cjs');
96
96
  require('../../../context/PasskeyContext/PasskeyContext.cjs');
97
97
  require('../../../context/OnrampContext/OnrampContext.cjs');
98
- var useRefreshUser = require('../useRefreshUser/useRefreshUser.cjs');
98
+ var useRefreshAuth = require('../useRefreshAuth/useRefreshAuth.cjs');
99
99
  var useDynamicWaas = require('../useDynamicWaas/useDynamicWaas.cjs');
100
100
  require('../../../store/state/sendBalances.cjs');
101
101
  require('../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
@@ -131,7 +131,7 @@ const useWalletBackup = () => {
131
131
  const { pushView } = ViewContext.useViewContext();
132
132
  const user = useUser.useUser();
133
133
  const projectSettings = useProjectSettings.useProjectSettings();
134
- const refresh = useRefreshUser.useRefreshUser();
134
+ const refresh = useRefreshAuth.useRefreshAuth();
135
135
  const { getWaasWalletConnector, getWaasWalletsByCredentials } = useDynamicWaas.useDynamicWaas();
136
136
  const { linkSocialAccount, isLinked } = useSocialAccounts.useSocialAccounts();
137
137
  const backupOptions = (_b = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.waas) === null || _b === void 0 ? void 0 : _b.backupOptions;
@@ -91,7 +91,7 @@ import '../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
91
91
  import '../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.js';
92
92
  import '../../../context/PasskeyContext/PasskeyContext.js';
93
93
  import '../../../context/OnrampContext/OnrampContext.js';
94
- import { useRefreshUser } from '../useRefreshUser/useRefreshUser.js';
94
+ import { useRefreshAuth } from '../useRefreshAuth/useRefreshAuth.js';
95
95
  import { useDynamicWaas } from '../useDynamicWaas/useDynamicWaas.js';
96
96
  import '../../../store/state/sendBalances.js';
97
97
  import '../../../store/state/connectorsInitializing/connectorsInitializing.js';
@@ -127,7 +127,7 @@ const useWalletBackup = () => {
127
127
  const { pushView } = useViewContext();
128
128
  const user = useUser();
129
129
  const projectSettings = useProjectSettings();
130
- const refresh = useRefreshUser();
130
+ const refresh = useRefreshAuth();
131
131
  const { getWaasWalletConnector, getWaasWalletsByCredentials } = useDynamicWaas();
132
132
  const { linkSocialAccount, isLinked } = useSocialAccounts();
133
133
  const backupOptions = (_b = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.waas) === null || _b === void 0 ? void 0 : _b.backupOptions;
@@ -97,7 +97,7 @@ require('../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cj
97
97
  require('../../../context/PasskeyContext/PasskeyContext.cjs');
98
98
  require('../../../context/OnrampContext/OnrampContext.cjs');
99
99
  var waas = require('../../../data/api/waas/waas.cjs');
100
- var useRefreshUser = require('../useRefreshUser/useRefreshUser.cjs');
100
+ var useRefreshAuth = require('../useRefreshAuth/useRefreshAuth.cjs');
101
101
  var useDynamicWaas = require('../useDynamicWaas/useDynamicWaas.cjs');
102
102
  require('../../../store/state/sendBalances.cjs');
103
103
  require('../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
@@ -138,7 +138,7 @@ const useWalletDelegation = () => {
138
138
  const projectSettings = useProjectSettings.useProjectSettings();
139
139
  const user = useUser.useUser();
140
140
  const environmentId = dynamicContextProps.useEnvironmentId();
141
- const refresh = useRefreshUser.useRefreshUser();
141
+ const refresh = useRefreshAuth.useRefreshAuth();
142
142
  const { getWaasWalletConnector } = useDynamicWaas.useDynamicWaas();
143
143
  const waasSettings = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.waas;
144
144
  const delegatedAccessEnabled = (_a = waasSettings === null || waasSettings === void 0 ? void 0 : waasSettings.delegatedAccess) === null || _a === void 0 ? void 0 : _a.enabled;
@@ -93,7 +93,7 @@ import '../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.js'
93
93
  import '../../../context/PasskeyContext/PasskeyContext.js';
94
94
  import '../../../context/OnrampContext/OnrampContext.js';
95
95
  import { updateWaasWalletSettings } from '../../../data/api/waas/waas.js';
96
- import { useRefreshUser } from '../useRefreshUser/useRefreshUser.js';
96
+ import { useRefreshAuth } from '../useRefreshAuth/useRefreshAuth.js';
97
97
  import { useDynamicWaas } from '../useDynamicWaas/useDynamicWaas.js';
98
98
  import '../../../store/state/sendBalances.js';
99
99
  import '../../../store/state/connectorsInitializing/connectorsInitializing.js';
@@ -134,7 +134,7 @@ const useWalletDelegation = () => {
134
134
  const projectSettings = useProjectSettings();
135
135
  const user = useUser();
136
136
  const environmentId = useEnvironmentId();
137
- const refresh = useRefreshUser();
137
+ const refresh = useRefreshAuth();
138
138
  const { getWaasWalletConnector } = useDynamicWaas();
139
139
  const waasSettings = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.waas;
140
140
  const delegatedAccessEnabled = (_a = waasSettings === null || waasSettings === void 0 ? void 0 : waasSettings.delegatedAccess) === null || _a === void 0 ? void 0 : _a.enabled;
@@ -8,11 +8,11 @@ var React = require('react');
8
8
  var reactI18next = require('react-i18next');
9
9
  var classNames = require('../../utils/functions/classNames/classNames.cjs');
10
10
  require('../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
11
+ var backup = require('../../shared/assets/backup.cjs');
11
12
  var exclamation = require('../../shared/assets/exclamation.cjs');
12
13
  require('@dynamic-labs/iconic');
13
14
  require('../../context/ViewContext/ViewContext.cjs');
14
15
  var warningRed = require('../../shared/assets/warning-red.cjs');
15
- var backup = require('../../shared/assets/backup.cjs');
16
16
  require('../../../../_virtual/_tslib.cjs');
17
17
  require('@dynamic-labs/wallet-connector-core');
18
18
  var logger = require('../../shared/logger.cjs');
@@ -4,11 +4,11 @@ import { useRef, useEffect } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { classNames } from '../../utils/functions/classNames/classNames.js';
6
6
  import '../../components/Accordion/components/AccordionItem/AccordionItem.js';
7
+ import { ReactComponent as SvgBackup } from '../../shared/assets/backup.js';
7
8
  import { ReactComponent as SvgExclamation } from '../../shared/assets/exclamation.js';
8
9
  import '@dynamic-labs/iconic';
9
10
  import '../../context/ViewContext/ViewContext.js';
10
11
  import { ReactComponent as SvgWarningRed } from '../../shared/assets/warning-red.js';
11
- import { ReactComponent as SvgBackup } from '../../shared/assets/backup.js';
12
12
  import '../../../../_virtual/_tslib.js';
13
13
  import '@dynamic-labs/wallet-connector-core';
14
14
  import { logger } from '../../shared/logger.js';
@@ -91,13 +91,13 @@ require('../../context/PasskeyContext/PasskeyContext.cjs');
91
91
  require('../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.cjs');
92
92
  require('../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
93
93
  require('../../utils/hooks/useWalletBackup/types.cjs');
94
+ var TextButton = require('../../components/TextButton/TextButton.cjs');
94
95
  require('../../utils/hooks/useWalletBackup/cloudProviders.cjs');
95
96
  require('../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.cjs');
96
97
  var useFetchNameService = require('../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs');
97
98
  require('../../context/OnrampContext/OnrampContext.cjs');
98
99
  require('../../../index.cjs');
99
100
  require('../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.cjs');
100
- var TextButton = require('../../components/TextButton/TextButton.cjs');
101
101
  require('qrcode');
102
102
  require('../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
103
103
  var NetworkPicker = require('../../components/NetworkPicker/NetworkPicker.cjs');
@@ -87,13 +87,13 @@ import '../../context/PasskeyContext/PasskeyContext.js';
87
87
  import '../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.js';
88
88
  import '../../utils/hooks/useWalletBackup/useWalletBackup.js';
89
89
  import '../../utils/hooks/useWalletBackup/types.js';
90
+ import { TextButton } from '../../components/TextButton/TextButton.js';
90
91
  import '../../utils/hooks/useWalletBackup/cloudProviders.js';
91
92
  import '../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.js';
92
93
  import { useFetchNameService } from '../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js';
93
94
  import '../../context/OnrampContext/OnrampContext.js';
94
95
  import '../../../index.js';
95
96
  import '../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.js';
96
- import { TextButton } from '../../components/TextButton/TextButton.js';
97
97
  import 'qrcode';
98
98
  import '../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
99
99
  import { NetworkPicker } from '../../components/NetworkPicker/NetworkPicker.js';
@@ -87,12 +87,12 @@ require('../../context/PasskeyContext/PasskeyContext.cjs');
87
87
  require('../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.cjs');
88
88
  require('../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
89
89
  require('../../utils/hooks/useWalletBackup/types.cjs');
90
+ var TextButton = require('../../components/TextButton/TextButton.cjs');
90
91
  require('../../utils/hooks/useWalletBackup/cloudProviders.cjs');
91
92
  require('../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.cjs');
92
93
  require('../../context/OnrampContext/OnrampContext.cjs');
93
94
  require('../../../index.cjs');
94
95
  require('../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.cjs');
95
- var TextButton = require('../../components/TextButton/TextButton.cjs');
96
96
  require('qrcode');
97
97
  require('../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
98
98
  var OnboardingUserDataForm = require('../CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs');
@@ -83,12 +83,12 @@ import '../../context/PasskeyContext/PasskeyContext.js';
83
83
  import '../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.js';
84
84
  import '../../utils/hooks/useWalletBackup/useWalletBackup.js';
85
85
  import '../../utils/hooks/useWalletBackup/types.js';
86
+ import { TextButton } from '../../components/TextButton/TextButton.js';
86
87
  import '../../utils/hooks/useWalletBackup/cloudProviders.js';
87
88
  import '../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.js';
88
89
  import '../../context/OnrampContext/OnrampContext.js';
89
90
  import '../../../index.js';
90
91
  import '../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.js';
91
- import { TextButton } from '../../components/TextButton/TextButton.js';
92
92
  import 'qrcode';
93
93
  import '../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
94
94
  import { OnboardingUserDataForm } from '../CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js';
@@ -105,12 +105,12 @@ require('../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.cjs');
105
105
  require('../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
106
106
  require('../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
107
107
  require('../../utils/hooks/useWalletBackup/types.cjs');
108
+ var TextButton = require('../../components/TextButton/TextButton.cjs');
108
109
  require('../../utils/hooks/useWalletBackup/cloudProviders.cjs');
109
110
  require('../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.cjs');
110
111
  require('../../context/OnrampContext/OnrampContext.cjs');
111
112
  require('../../../index.cjs');
112
113
  require('../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.cjs');
113
- var TextButton = require('../../components/TextButton/TextButton.cjs');
114
114
  require('qrcode');
115
115
  var PinField = require('../../components/PinField/PinField.cjs');
116
116
  require('../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
@@ -101,12 +101,12 @@ import '../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.js';
101
101
  import '../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
102
102
  import '../../utils/hooks/useWalletBackup/useWalletBackup.js';
103
103
  import '../../utils/hooks/useWalletBackup/types.js';
104
+ import { TextButton } from '../../components/TextButton/TextButton.js';
104
105
  import '../../utils/hooks/useWalletBackup/cloudProviders.js';
105
106
  import '../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.js';
106
107
  import '../../context/OnrampContext/OnrampContext.js';
107
108
  import '../../../index.js';
108
109
  import '../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.js';
109
- import { TextButton } from '../../components/TextButton/TextButton.js';
110
110
  import 'qrcode';
111
111
  import { PinField } from '../../components/PinField/PinField.js';
112
112
  import '../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
@@ -23,8 +23,8 @@ require('@dynamic-labs/iconic');
23
23
  var arrowLeft = require('../../shared/assets/arrow-left.cjs');
24
24
  var close = require('../../shared/assets/close.cjs');
25
25
  var exportEmbeddedHero = require('../../shared/assets/export-embedded-hero.cjs');
26
- var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
27
26
  var filledQuestionMark = require('../../shared/assets/filled-question-mark.cjs');
27
+ var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
28
28
  var logger = require('../../shared/logger.cjs');
29
29
  require('@dynamic-labs/wallet-book');
30
30
  require('../../utils/constants/colors.cjs');