@dynamic-labs/sdk-react-core 1.4.7 → 1.4.9

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 (76) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +11 -11
  5. package/src/lib/context/ConnectWithEmailOtpContext/ConnectWithEmailOtpProvider.cjs +1 -1
  6. package/src/lib/context/ConnectWithEmailOtpContext/ConnectWithEmailOtpProvider.js +1 -1
  7. package/src/lib/context/DynamicContext/DynamicContext.cjs +1 -0
  8. package/src/lib/context/DynamicContext/DynamicContext.js +1 -0
  9. package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.d.ts +1 -1
  10. package/src/lib/context/FundingContext/FundingContext.cjs +1 -1
  11. package/src/lib/context/FundingContext/FundingContext.js +1 -1
  12. package/src/lib/context/FundingContext/useFunding/useFunding.cjs +1 -1
  13. package/src/lib/context/FundingContext/useFunding/useFunding.js +1 -1
  14. package/src/lib/data/api.cjs +25 -25
  15. package/src/lib/data/api.d.ts +4 -4
  16. package/src/lib/data/api.js +25 -25
  17. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/NewToWeb3WalletItem/NewToWeb3WalletItem.d.ts +1 -1
  18. package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.d.ts +1 -1
  19. package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.d.ts +1 -1
  20. package/src/lib/shared/utils/hooks/useThrottle/useThrottle.d.ts +1 -1
  21. package/src/lib/utils/constants/values.cjs +1 -1
  22. package/src/lib/utils/constants/values.js +1 -1
  23. package/src/lib/utils/functions/getSiweStatement/getSiweStatement.d.ts +1 -1
  24. package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.d.ts +4 -4
  25. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +1 -1
  26. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +1 -1
  27. package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +1 -1
  28. package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +1 -1
  29. package/src/lib/utils/functions/isWalletConnected/isWalletConnected.cjs +1 -1
  30. package/src/lib/utils/functions/isWalletConnected/isWalletConnected.js +1 -1
  31. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +3 -3
  32. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +3 -3
  33. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +4 -4
  34. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +4 -4
  35. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +1 -1
  36. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +1 -1
  37. package/src/lib/utils/hooks/events/useWalletConnectorEvent/useWalletConnectorEvent.d.ts +1 -1
  38. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +4 -4
  39. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +4 -4
  40. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +1 -1
  41. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +1 -1
  42. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.d.ts +1 -1
  43. package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +4 -4
  44. package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +4 -4
  45. package/src/lib/utils/hooks/usePromise/usePromise.d.ts +1 -1
  46. package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.cjs +1 -1
  47. package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.js +1 -1
  48. package/src/lib/utils/hooks/useResizeObserver/useResizeObserver.d.ts +1 -1
  49. package/src/lib/utils/hooks/useSocialAuth/farcaster.cjs +1 -1
  50. package/src/lib/utils/hooks/useSocialAuth/farcaster.js +1 -1
  51. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +9 -9
  52. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.d.ts +2 -2
  53. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +9 -9
  54. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +1 -1
  55. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +1 -1
  56. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +4 -4
  57. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +4 -4
  58. package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.cjs +1 -1
  59. package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.js +1 -1
  60. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +2 -4
  61. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +2 -1
  62. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +2 -4
  63. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -1
  64. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -1
  65. package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.cjs +7 -7
  66. package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.d.ts +3 -3
  67. package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.js +7 -7
  68. package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.cjs +1 -1
  69. package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.js +1 -1
  70. package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.cjs +1 -1
  71. package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.js +1 -1
  72. package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.cjs +20 -20
  73. package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.d.ts +2 -2
  74. package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.js +20 -20
  75. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -1
  76. package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -1
@@ -5,4 +5,4 @@
5
5
  * @param delay - The time in milliseconds to wait before the next call.
6
6
  * @returns A throttled version of the callback function.
7
7
  */
8
- export declare const useThrottle: <T extends (...args: unknown[]) => void>(callback: T, delay: number) => (...args: Parameters<T>) => void;
8
+ export declare const useThrottle: <T extends (...args: unknown[]) => void>(callback: T, delay: number) => ((...args: Parameters<T>) => void);
@@ -10,7 +10,7 @@ const DEFAULT_NUMBER_OF_WALLETS_TO_SHOW = 10;
10
10
  // https://github.com/jaredhanson/id-blockchain-claims-in-jwt/blob/main/draft.md
11
11
  const ChainEnumToVerifiedCredentialName = {
12
12
  ALGO: 'algorand',
13
- BTC: 'bip122',
13
+ BTC: 'bip122', // see: https://namespaces.chainagnostic.org/bip122/caip2
14
14
  COSMOS: 'cosmos',
15
15
  ETH: 'eip155',
16
16
  EVM: 'eip155',
@@ -6,7 +6,7 @@ const DEFAULT_NUMBER_OF_WALLETS_TO_SHOW = 10;
6
6
  // https://github.com/jaredhanson/id-blockchain-claims-in-jwt/blob/main/draft.md
7
7
  const ChainEnumToVerifiedCredentialName = {
8
8
  ALGO: 'algorand',
9
- BTC: 'bip122',
9
+ BTC: 'bip122', // see: https://namespaces.chainagnostic.org/bip122/caip2
10
10
  COSMOS: 'cosmos',
11
11
  ETH: 'eip155',
12
12
  EVM: 'eip155',
@@ -1,4 +1,4 @@
1
1
  export declare const getSiweStatement: ({ appName, siweStatement, }: {
2
- appName?: string | undefined;
2
+ appName?: string;
3
3
  siweStatement: string | undefined;
4
4
  }) => string;
@@ -14,8 +14,8 @@ export declare const getEditableUserProfileFields: (projectSettings?: ProjectSet
14
14
  * @returns {ProjectSettingsKyc[]} - The list of non-editable user profile fields based on project settings.
15
15
  */
16
16
  export declare const getNonEditableUserProfileFields: ({ projectSettingsKyc, user, }: {
17
- projectSettingsKyc?: ProjectSettingsKyc[] | undefined;
18
- user?: UserFields | undefined;
17
+ projectSettingsKyc?: ProjectSettingsKyc[];
18
+ user?: UserFields;
19
19
  }) => ProjectSettingsKyc[];
20
20
  /**
21
21
  * Get all user profile fields that exist in the user profile and are defined in the project
@@ -25,6 +25,6 @@ export declare const getNonEditableUserProfileFields: ({ projectSettingsKyc, use
25
25
  * @returns {ProjectSettingsKyc[]} - The list of all user profile fields based on project settings.
26
26
  */
27
27
  export declare const getUserProfileFields: ({ projectSettingsKyc, user, }: {
28
- projectSettingsKyc?: ProjectSettingsKyc[] | undefined;
29
- user?: UserProfile | undefined;
28
+ projectSettingsKyc?: ProjectSettingsKyc[];
29
+ user?: UserProfile;
30
30
  }) => ProjectSettingsKyc[];
@@ -6,7 +6,7 @@ var _tslib = require('../../../../../_virtual/_tslib.cjs');
6
6
  var index = require('../generateMessages/index.cjs');
7
7
 
8
8
  // TODO - This function is doing too much we should split it up.
9
- const getVerifyArgs = ({ walletConnector, nonce, walletProvider, environmentId, displaySiweStatement, skipEmptyAccountCheck, siweStatement, publicWalletAddress, signedMessageOverride, messageToSignOverride, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
9
+ const getVerifyArgs = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ walletConnector, nonce, walletProvider, environmentId, displaySiweStatement, skipEmptyAccountCheck, siweStatement, publicWalletAddress, signedMessageOverride, messageToSignOverride, }) {
10
10
  // WARNING - PLEASE READ!
11
11
  // DO NOT ADD ANY NEW ASYNC WORK WITH AWAIT!
12
12
  // Deep linking could break with too many blocking awaits
@@ -2,7 +2,7 @@ import { __awaiter } from '../../../../../_virtual/_tslib.js';
2
2
  import { generateMessages } from '../generateMessages/index.js';
3
3
 
4
4
  // TODO - This function is doing too much we should split it up.
5
- const getVerifyArgs = ({ walletConnector, nonce, walletProvider, environmentId, displaySiweStatement, skipEmptyAccountCheck, siweStatement, publicWalletAddress, signedMessageOverride, messageToSignOverride, }) => __awaiter(void 0, void 0, void 0, function* () {
5
+ const getVerifyArgs = (_a) => __awaiter(void 0, [_a], void 0, function* ({ walletConnector, nonce, walletProvider, environmentId, displaySiweStatement, skipEmptyAccountCheck, siweStatement, publicWalletAddress, signedMessageOverride, messageToSignOverride, }) {
6
6
  // WARNING - PLEASE READ!
7
7
  // DO NOT ADD ANY NEW ASYNC WORK WITH AWAIT!
8
8
  // Deep linking could break with too many blocking awaits
@@ -31,7 +31,7 @@ require('viem/chains');
31
31
  *
32
32
  * @throws Error if the authentication call returns no or invalid JWT
33
33
  */
34
- const handleUnlinkHelper = ({ environmentId, primaryWalletId, walletId, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
34
+ const handleUnlinkHelper = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ environmentId, primaryWalletId, walletId, }) {
35
35
  const token = getAuthToken.getAuthToken();
36
36
  if (!token)
37
37
  return;
@@ -27,7 +27,7 @@ import 'viem/chains';
27
27
  *
28
28
  * @throws Error if the authentication call returns no or invalid JWT
29
29
  */
30
- const handleUnlinkHelper = ({ environmentId, primaryWalletId, walletId, }) => __awaiter(void 0, void 0, void 0, function* () {
30
+ const handleUnlinkHelper = (_a) => __awaiter(void 0, [_a], void 0, function* ({ environmentId, primaryWalletId, walletId, }) {
31
31
  const token = getAuthToken();
32
32
  if (!token)
33
33
  return;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _tslib = require('../../../../../_virtual/_tslib.cjs');
6
6
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
7
7
 
8
- const isWalletConnected = ({ address, chain, connector, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
8
+ const isWalletConnected = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ address, chain, connector, }) {
9
9
  const accounts = yield connector.getConnectedAccounts();
10
10
  return accounts.some((account) => walletConnectorCore.isSameAddress(account, address, chain));
11
11
  });
@@ -1,7 +1,7 @@
1
1
  import { __awaiter } from '../../../../../_virtual/_tslib.js';
2
2
  import { isSameAddress } from '@dynamic-labs/wallet-connector-core';
3
3
 
4
- const isWalletConnected = ({ address, chain, connector, }) => __awaiter(void 0, void 0, void 0, function* () {
4
+ const isWalletConnected = (_a) => __awaiter(void 0, [_a], void 0, function* ({ address, chain, connector, }) {
5
5
  const accounts = yield connector.getConnectedAccounts();
6
6
  return accounts.some((account) => isSameAddress(account, address, chain));
7
7
  });
@@ -118,8 +118,8 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
118
118
  if (!userCancelled)
119
119
  setIsVerificationInProgress(false);
120
120
  };
121
- return ({ walletConnector, fetchPublicAddressOpts = undefined, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
122
- var _a;
121
+ return (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ walletConnector, fetchPublicAddressOpts = undefined, }) {
122
+ var _b;
123
123
  // Raise verification ongoing flag
124
124
  setIsVerificationInProgress(true);
125
125
  try {
@@ -160,7 +160,7 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
160
160
  }
161
161
  return;
162
162
  }
163
- if ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _a === void 0 ? void 0 : _a.enabled) {
163
+ if ((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _b === void 0 ? void 0 : _b.enabled) {
164
164
  engageCaptcha({
165
165
  authMethod: 'wallet',
166
166
  onCaptchaSuccess: (captchaToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
@@ -114,8 +114,8 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
114
114
  if (!userCancelled)
115
115
  setIsVerificationInProgress(false);
116
116
  };
117
- return ({ walletConnector, fetchPublicAddressOpts = undefined, }) => __awaiter(void 0, void 0, void 0, function* () {
118
- var _a;
117
+ return (_a) => __awaiter(void 0, [_a], void 0, function* ({ walletConnector, fetchPublicAddressOpts = undefined, }) {
118
+ var _b;
119
119
  // Raise verification ongoing flag
120
120
  setIsVerificationInProgress(true);
121
121
  try {
@@ -156,7 +156,7 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
156
156
  }
157
157
  return;
158
158
  }
159
- if ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _a === void 0 ? void 0 : _a.enabled) {
159
+ if ((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _b === void 0 ? void 0 : _b.enabled) {
160
160
  engageCaptcha({
161
161
  authMethod: 'wallet',
162
162
  onCaptchaSuccess: (captchaToken) => __awaiter(void 0, void 0, void 0, function* () {
@@ -109,8 +109,8 @@ const useConnectAndSignSplitSteps = () => {
109
109
  // It's used when we want to connect and sign in two separate steps
110
110
  // For example on mobile when we want to sign on button click
111
111
  // or in Dapper
112
- const onlyConnectUser = ({ walletConnector, fetchPublicAddressOpts = undefined, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
113
- var _a;
112
+ const onlyConnectUser = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ walletConnector, fetchPublicAddressOpts = undefined, }) {
113
+ var _b;
114
114
  // Raise verification ongoing flag
115
115
  setIsVerificationInProgress(true);
116
116
  yield showPendingConnectView.showPendingConnectView(walletConnector, setView);
@@ -123,7 +123,7 @@ const useConnectAndSignSplitSteps = () => {
123
123
  handleWalletsToConnect({ walletConnector });
124
124
  return;
125
125
  }
126
- if ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _a === void 0 ? void 0 : _a.enabled) {
126
+ if ((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _b === void 0 ? void 0 : _b.enabled) {
127
127
  engageCaptcha({
128
128
  authMethod: 'wallet',
129
129
  onCaptchaSuccess: (_captchaToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
@@ -143,7 +143,7 @@ const useConnectAndSignSplitSteps = () => {
143
143
  });
144
144
  // This method is similar to useConnectAndSign, but it does not call showPendingConnectView
145
145
  // This is because we already called it in onlyConnectUser and now we just want to sign
146
- const signAlreadyConnectedUser = ({ walletConnector, fetchPublicAddressOpts = undefined, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
146
+ const signAlreadyConnectedUser = (_c) => _tslib.__awaiter(void 0, [_c], void 0, function* ({ walletConnector, fetchPublicAddressOpts = undefined, }) {
147
147
  // Raise verification ongoing flag
148
148
  setIsVerificationInProgress(true);
149
149
  try {
@@ -105,8 +105,8 @@ const useConnectAndSignSplitSteps = () => {
105
105
  // It's used when we want to connect and sign in two separate steps
106
106
  // For example on mobile when we want to sign on button click
107
107
  // or in Dapper
108
- const onlyConnectUser = ({ walletConnector, fetchPublicAddressOpts = undefined, }) => __awaiter(void 0, void 0, void 0, function* () {
109
- var _a;
108
+ const onlyConnectUser = (_a) => __awaiter(void 0, [_a], void 0, function* ({ walletConnector, fetchPublicAddressOpts = undefined, }) {
109
+ var _b;
110
110
  // Raise verification ongoing flag
111
111
  setIsVerificationInProgress(true);
112
112
  yield showPendingConnectView(walletConnector, setView);
@@ -119,7 +119,7 @@ const useConnectAndSignSplitSteps = () => {
119
119
  handleWalletsToConnect({ walletConnector });
120
120
  return;
121
121
  }
122
- if ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _a === void 0 ? void 0 : _a.enabled) {
122
+ if ((_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security.hCaptcha) === null || _b === void 0 ? void 0 : _b.enabled) {
123
123
  engageCaptcha({
124
124
  authMethod: 'wallet',
125
125
  onCaptchaSuccess: (_captchaToken) => __awaiter(void 0, void 0, void 0, function* () {
@@ -139,7 +139,7 @@ const useConnectAndSignSplitSteps = () => {
139
139
  });
140
140
  // This method is similar to useConnectAndSign, but it does not call showPendingConnectView
141
141
  // This is because we already called it in onlyConnectUser and now we just want to sign
142
- const signAlreadyConnectedUser = ({ walletConnector, fetchPublicAddressOpts = undefined, }) => __awaiter(void 0, void 0, void 0, function* () {
142
+ const signAlreadyConnectedUser = (_c) => __awaiter(void 0, [_c], void 0, function* ({ walletConnector, fetchPublicAddressOpts = undefined, }) {
143
143
  // Raise verification ongoing flag
144
144
  setIsVerificationInProgress(true);
145
145
  try {
@@ -84,7 +84,7 @@ const useSignConnectOnlyUser = () => {
84
84
  projectSettings,
85
85
  setIsSingleWalletAccount,
86
86
  });
87
- return ({ walletConnector, fetchPublicAddressOpts = undefined, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
87
+ return (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ walletConnector, fetchPublicAddressOpts = undefined, }) {
88
88
  try {
89
89
  if (walletConnectorCore.isEmbeddedConnector(walletConnector) &&
90
90
  !walletConnectorCore.isBloctoConnector(walletConnector)) {
@@ -80,7 +80,7 @@ const useSignConnectOnlyUser = () => {
80
80
  projectSettings,
81
81
  setIsSingleWalletAccount,
82
82
  });
83
- return ({ walletConnector, fetchPublicAddressOpts = undefined, }) => __awaiter(void 0, void 0, void 0, function* () {
83
+ return (_a) => __awaiter(void 0, [_a], void 0, function* ({ walletConnector, fetchPublicAddressOpts = undefined, }) {
84
84
  try {
85
85
  if (isEmbeddedConnector(walletConnector) &&
86
86
  !isBloctoConnector(walletConnector)) {
@@ -32,4 +32,4 @@ import { EventArgs } from '../types';
32
32
  * },
33
33
  * );
34
34
  */
35
- export declare const useWalletConnectorEvent: <Event_1 extends keyof WalletConnectorEventTypes = keyof WalletConnectorEventTypes>(eventEmitters: WalletConnector | WalletConnector[] | undefined, eventName: Event_1, handler: (...args: [...EventArgs<WalletConnectorEventTypes, Event_1>, import("@dynamic-labs/wallet-connector-core").WalletConnectorCore.WalletConnector]) => void) => void;
35
+ export declare const useWalletConnectorEvent: <Event extends keyof WalletConnectorEventTypes = keyof WalletConnectorEventTypes>(eventEmitters: WalletConnector | WalletConnector[] | undefined, eventName: Event, handler: (...args: [...EventArgs<WalletConnectorEventTypes, Event>, WalletConnector]) => void) => void;
@@ -90,8 +90,8 @@ const useCreateDynamicEmbeddedWalletMutation = () => {
90
90
  const embeddedChains = embeddedChainConfig
91
91
  .filter((chain) => chain.enabled)
92
92
  .map((c) => (c.name === 'SOL' ? sdkApi.ChainEnum.Sol : sdkApi.ChainEnum.Evm));
93
- const createDynamicEmbeddedWalletMutation = React.useCallback(({ authToken, decodedJwt, environmentId, walletConnectorOptions, withAuthenticator, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
94
- var _d, _e;
93
+ const createDynamicEmbeddedWalletMutation = React.useCallback((_d) => _tslib.__awaiter(void 0, [_d], void 0, function* ({ authToken, decodedJwt, environmentId, walletConnectorOptions, withAuthenticator, }) {
94
+ var _e, _f;
95
95
  setIsLoading(true);
96
96
  const createEmbeddedWalletMethodToUse = withAuthenticator
97
97
  ? createEmbeddedWalletWithPasskey.createEmbeddedWalletWithPasskey
@@ -104,9 +104,9 @@ const useCreateDynamicEmbeddedWalletMutation = () => {
104
104
  user: user !== null && user !== void 0 ? user : createUserProfile.createUserProfile(decodedJwt),
105
105
  walletConnector: findPasskeyEmailWalletConnector.findPasskeyEmailWalletConnector(walletConnectorOptions, primaryEmbeddedChain),
106
106
  });
107
- const turnkeyVerifiedCredentials = (_d = updatedDecodedJwt === null || updatedDecodedJwt === void 0 ? void 0 : updatedDecodedJwt.verifiedCredentials) === null || _d === void 0 ? void 0 : _d.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'));
107
+ const turnkeyVerifiedCredentials = (_e = updatedDecodedJwt === null || updatedDecodedJwt === void 0 ? void 0 : updatedDecodedJwt.verifiedCredentials) === null || _e === void 0 ? void 0 : _e.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'));
108
108
  /** It's not authenticated if it's a turnkey wallet that still hasn't created a passkey */
109
- const authenticated = Boolean((_e = turnkeyVerifiedCredentials === null || turnkeyVerifiedCredentials === void 0 ? void 0 : turnkeyVerifiedCredentials.walletProperties) === null || _e === void 0 ? void 0 : _e.isAuthenticatorAttached);
109
+ const authenticated = Boolean((_f = turnkeyVerifiedCredentials === null || turnkeyVerifiedCredentials === void 0 ? void 0 : turnkeyVerifiedCredentials.walletProperties) === null || _f === void 0 ? void 0 : _f.isAuthenticatorAttached);
110
110
  const passkeyWallet = {
111
111
  address: (yield walletConnector.fetchPublicAddress()) || '',
112
112
  authenticated,
@@ -86,8 +86,8 @@ const useCreateDynamicEmbeddedWalletMutation = () => {
86
86
  const embeddedChains = embeddedChainConfig
87
87
  .filter((chain) => chain.enabled)
88
88
  .map((c) => (c.name === 'SOL' ? ChainEnum.Sol : ChainEnum.Evm));
89
- const createDynamicEmbeddedWalletMutation = useCallback(({ authToken, decodedJwt, environmentId, walletConnectorOptions, withAuthenticator, }) => __awaiter(void 0, void 0, void 0, function* () {
90
- var _d, _e;
89
+ const createDynamicEmbeddedWalletMutation = useCallback((_d) => __awaiter(void 0, [_d], void 0, function* ({ authToken, decodedJwt, environmentId, walletConnectorOptions, withAuthenticator, }) {
90
+ var _e, _f;
91
91
  setIsLoading(true);
92
92
  const createEmbeddedWalletMethodToUse = withAuthenticator
93
93
  ? createEmbeddedWalletWithPasskey
@@ -100,9 +100,9 @@ const useCreateDynamicEmbeddedWalletMutation = () => {
100
100
  user: user !== null && user !== void 0 ? user : createUserProfile(decodedJwt),
101
101
  walletConnector: findPasskeyEmailWalletConnector(walletConnectorOptions, primaryEmbeddedChain),
102
102
  });
103
- const turnkeyVerifiedCredentials = (_d = updatedDecodedJwt === null || updatedDecodedJwt === void 0 ? void 0 : updatedDecodedJwt.verifiedCredentials) === null || _d === void 0 ? void 0 : _d.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'));
103
+ const turnkeyVerifiedCredentials = (_e = updatedDecodedJwt === null || updatedDecodedJwt === void 0 ? void 0 : updatedDecodedJwt.verifiedCredentials) === null || _e === void 0 ? void 0 : _e.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'));
104
104
  /** It's not authenticated if it's a turnkey wallet that still hasn't created a passkey */
105
- const authenticated = Boolean((_e = turnkeyVerifiedCredentials === null || turnkeyVerifiedCredentials === void 0 ? void 0 : turnkeyVerifiedCredentials.walletProperties) === null || _e === void 0 ? void 0 : _e.isAuthenticatorAttached);
105
+ const authenticated = Boolean((_f = turnkeyVerifiedCredentials === null || turnkeyVerifiedCredentials === void 0 ? void 0 : turnkeyVerifiedCredentials.walletProperties) === null || _f === void 0 ? void 0 : _f.isAuthenticatorAttached);
106
106
  const passkeyWallet = {
107
107
  address: (yield walletConnector.fetchPublicAddress()) || '',
108
108
  authenticated,
@@ -80,7 +80,7 @@ const useEmbeddedReveal = () => {
80
80
  const { projectSettings, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
81
81
  const { userHasEmbeddedWallet } = useEmbeddedWallet.useEmbeddedWallet();
82
82
  const { setView } = ViewContext.useViewContext();
83
- const initExportProcess = React.useCallback((recoveryPhrase = false) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
83
+ const initExportProcess = React.useCallback((...args_1) => _tslib.__awaiter(void 0, [...args_1], void 0, function* (recoveryPhrase = false) {
84
84
  var _a, _b;
85
85
  const jwt = getAuthToken.getAuthToken();
86
86
  if (!jwt) {
@@ -76,7 +76,7 @@ const useEmbeddedReveal = () => {
76
76
  const { projectSettings, setShowAuthFlow } = useInternalDynamicContext();
77
77
  const { userHasEmbeddedWallet } = useEmbeddedWallet();
78
78
  const { setView } = useViewContext();
79
- const initExportProcess = useCallback((recoveryPhrase = false) => __awaiter(void 0, void 0, void 0, function* () {
79
+ const initExportProcess = useCallback((...args_1) => __awaiter(void 0, [...args_1], void 0, function* (recoveryPhrase = false) {
80
80
  var _a, _b;
81
81
  const jwt = getAuthToken();
82
82
  if (!jwt) {
@@ -1,6 +1,6 @@
1
1
  import { WalletConnector } from '@dynamic-labs/wallet-connector-core';
2
2
  export declare const useHandleWalletsToConnect: () => {
3
3
  handleWalletsToConnect: ({ walletConnector, }: {
4
- walletConnector?: import("@dynamic-labs/wallet-connector-core").WalletConnectorCore.WalletConnector | undefined;
4
+ walletConnector?: WalletConnector;
5
5
  }) => void;
6
6
  };
@@ -82,12 +82,12 @@ const useInitEmbeddedWalletAuthMethod = () => {
82
82
  const { setView } = ViewContext.useViewContext();
83
83
  const [isLoading, setIsLoading] = React.useState(false);
84
84
  const [error, setError] = React.useState();
85
- const initAuthMethod = ({ authenticatorType, iframeContainer, currentAction, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
86
- var _a, _b, _c, _d;
85
+ const initAuthMethod = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ authenticatorType, iframeContainer, currentAction, }) {
86
+ var _b, _c, _d, _e;
87
87
  setIsLoading(true);
88
88
  const wallet = getEOAWallet.getEOAWallet(primaryWallet, (user === null || user === void 0 ? void 0 : user.verifiedCredentials) || []);
89
- const sessionExpiration = ((_b = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _a === void 0 ? void 0 : _a.sessionKeyDuration) === null || _b === void 0 ? void 0 : _b.amount) || 0;
90
- const sessionExpirationUnit = ((_d = (_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _c === void 0 ? void 0 : _c.sessionKeyDuration) === null || _d === void 0 ? void 0 : _d.unit) ===
89
+ const sessionExpiration = ((_c = (_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _b === void 0 ? void 0 : _b.sessionKeyDuration) === null || _c === void 0 ? void 0 : _c.amount) || 0;
90
+ const sessionExpirationUnit = ((_e = (_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _d === void 0 ? void 0 : _d.sessionKeyDuration) === null || _e === void 0 ? void 0 : _e.unit) ===
91
91
  'minutes'
92
92
  ? 60
93
93
  : 3600;
@@ -78,12 +78,12 @@ const useInitEmbeddedWalletAuthMethod = () => {
78
78
  const { setView } = useViewContext();
79
79
  const [isLoading, setIsLoading] = useState(false);
80
80
  const [error, setError] = useState();
81
- const initAuthMethod = ({ authenticatorType, iframeContainer, currentAction, }) => __awaiter(void 0, void 0, void 0, function* () {
82
- var _a, _b, _c, _d;
81
+ const initAuthMethod = (_a) => __awaiter(void 0, [_a], void 0, function* ({ authenticatorType, iframeContainer, currentAction, }) {
82
+ var _b, _c, _d, _e;
83
83
  setIsLoading(true);
84
84
  const wallet = getEOAWallet(primaryWallet, (user === null || user === void 0 ? void 0 : user.verifiedCredentials) || []);
85
- const sessionExpiration = ((_b = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _a === void 0 ? void 0 : _a.sessionKeyDuration) === null || _b === void 0 ? void 0 : _b.amount) || 0;
86
- const sessionExpirationUnit = ((_d = (_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _c === void 0 ? void 0 : _c.sessionKeyDuration) === null || _d === void 0 ? void 0 : _d.unit) ===
85
+ const sessionExpiration = ((_c = (_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _b === void 0 ? void 0 : _b.sessionKeyDuration) === null || _c === void 0 ? void 0 : _c.amount) || 0;
86
+ const sessionExpirationUnit = ((_e = (_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _d === void 0 ? void 0 : _d.sessionKeyDuration) === null || _e === void 0 ? void 0 : _e.unit) ===
87
87
  'minutes'
88
88
  ? 60
89
89
  : 3600;
@@ -30,4 +30,4 @@ import { UsePromiseOptions, PromiseState } from './usePromise.types';
30
30
  * return <div>Data: {data}</div>;
31
31
  * };
32
32
  */
33
- export declare const usePromise: <T, E = Error>(fetcher: () => T | Promise<T>, options?: UsePromiseOptions<T, E> | undefined) => PromiseState<T, E>;
33
+ export declare const usePromise: <T, E = Error>(fetcher: () => T | Promise<T>, options?: UsePromiseOptions<T, E>) => PromiseState<T, E>;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _tslib = require('../../../../../../../_virtual/_tslib.cjs');
6
6
 
7
7
  const isPromise = (value) => value instanceof Promise;
8
- const resolveFetcher = (fetcher, { retries }, callback) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
8
+ const resolveFetcher = (fetcher_1, _a, callback_1) => _tslib.__awaiter(void 0, [fetcher_1, _a, callback_1], void 0, function* (fetcher, { retries }, callback) {
9
9
  const totalNumberOfAttempts = retries ? retries + 1 : 1;
10
10
  let currentAttempt = 0;
11
11
  let data;
@@ -1,7 +1,7 @@
1
1
  import { __awaiter } from '../../../../../../../_virtual/_tslib.js';
2
2
 
3
3
  const isPromise = (value) => value instanceof Promise;
4
- const resolveFetcher = (fetcher, { retries }, callback) => __awaiter(void 0, void 0, void 0, function* () {
4
+ const resolveFetcher = (fetcher_1, _a, callback_1) => __awaiter(void 0, [fetcher_1, _a, callback_1], void 0, function* (fetcher, { retries }, callback) {
5
5
  const totalNumberOfAttempts = retries ? retries + 1 : 1;
6
6
  let currentAttempt = 0;
7
7
  let data;
@@ -3,4 +3,4 @@ export interface ResizeObserverEntry {
3
3
  contentRect: DOMRectReadOnly;
4
4
  target: HTMLElement;
5
5
  }
6
- export declare const useResizeObserver: (ref: RefObject<HTMLElement>, callback?: ((entry: DOMRectReadOnly) => void) | undefined) => [DOMRectReadOnly | undefined];
6
+ export declare const useResizeObserver: (ref: RefObject<HTMLElement>, callback?: (entry: DOMRectReadOnly) => void) => [DOMRectReadOnly | undefined];
@@ -61,7 +61,7 @@ const status = (connectStatusRequest) => _tslib.__awaiter(void 0, void 0, void 0
61
61
  return;
62
62
  }
63
63
  });
64
- const watchStatus = (connectStatusRequest, { timeout = STATUS_TIMEOUT, interval = STATUS_INTERVAL } = {}) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
64
+ const watchStatus = (connectStatusRequest_1, ...args_1) => _tslib.__awaiter(void 0, [connectStatusRequest_1, ...args_1], void 0, function* (connectStatusRequest, { timeout = STATUS_TIMEOUT, interval = STATUS_INTERVAL } = {}) {
65
65
  const deadline = Date.now() + timeout;
66
66
  let shouldPoll = true;
67
67
  dynamicEvents.dynamicEvents.on('farcasterConnectCancelled', () => {
@@ -57,7 +57,7 @@ const status = (connectStatusRequest) => __awaiter(void 0, void 0, void 0, funct
57
57
  return;
58
58
  }
59
59
  });
60
- const watchStatus = (connectStatusRequest, { timeout = STATUS_TIMEOUT, interval = STATUS_INTERVAL } = {}) => __awaiter(void 0, void 0, void 0, function* () {
60
+ const watchStatus = (connectStatusRequest_1, ...args_1) => __awaiter(void 0, [connectStatusRequest_1, ...args_1], void 0, function* (connectStatusRequest, { timeout = STATUS_TIMEOUT, interval = STATUS_INTERVAL } = {}) {
61
61
  const deadline = Date.now() + timeout;
62
62
  let shouldPoll = true;
63
63
  dynamicEvents.on('farcasterConnectCancelled', () => {
@@ -222,8 +222,8 @@ const useSocialAuth = ({ sessionTimeout, authMode, onSettled, onError, }) => {
222
222
  handleError(types.SocialOAuthErrorCode.GENERAL_ERROR, error);
223
223
  }
224
224
  });
225
- const connectSocialAccount = ({ provider, validator, captchaToken, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
226
- var _c, _d;
225
+ const connectSocialAccount = (_c) => _tslib.__awaiter(void 0, [_c], void 0, function* ({ provider, validator, captchaToken, }) {
226
+ var _d, _e;
227
227
  clearInterval(authWindowInterval.current);
228
228
  clearError();
229
229
  setIsProcessing(true);
@@ -246,9 +246,9 @@ const useSocialAuth = ({ sessionTimeout, authMode, onSettled, onError, }) => {
246
246
  providersWaitingOauthMessage.current = Object.assign(Object.assign({}, providersWaitingOauthMessage.current), { [provider]: false });
247
247
  };
248
248
  const handleAuthWindowMessage = (event) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
249
- var _e, _f;
249
+ var _f, _g;
250
250
  const message = event.data;
251
- const apiProvider = getProviderByType.getProviderByType((_e = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _e !== void 0 ? _e : [], provider);
251
+ const apiProvider = getProviderByType.getProviderByType((_f = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _f !== void 0 ? _f : [], provider);
252
252
  if (!(apiProvider === null || apiProvider === void 0 ? void 0 : apiProvider.redirectUrl)) {
253
253
  return;
254
254
  }
@@ -286,7 +286,7 @@ const useSocialAuth = ({ sessionTimeout, authMode, onSettled, onError, }) => {
286
286
  return;
287
287
  }
288
288
  setIsProcessing(true);
289
- if (!((_f = providersWaitingOauthMessage.current) === null || _f === void 0 ? void 0 : _f[provider])) {
289
+ if (!((_g = providersWaitingOauthMessage.current) === null || _g === void 0 ? void 0 : _g[provider])) {
290
290
  handleError(types.SocialOAuthErrorCode.SESSION_TIMEOUT, `Connecting ${provider} account session timeout.`);
291
291
  return;
292
292
  }
@@ -327,12 +327,12 @@ const useSocialAuth = ({ sessionTimeout, authMode, onSettled, onError, }) => {
327
327
  }
328
328
  setIsProcessing(false);
329
329
  });
330
- const loginUrl = getOauthLoginUrl.getOauthLoginUrl((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _c !== void 0 ? _c : [], provider);
330
+ const loginUrl = getOauthLoginUrl.getOauthLoginUrl((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _d !== void 0 ? _d : [], provider);
331
331
  if (!loginUrl) {
332
332
  handleError(types.SocialOAuthErrorCode.NO_OAUTH_URL, `Failed to get login url to connect social account: ${provider}`);
333
333
  return;
334
334
  }
335
- if (!((_d = providersWaitingOauthMessage.current) === null || _d === void 0 ? void 0 : _d[provider])) {
335
+ if (!((_e = providersWaitingOauthMessage.current) === null || _e === void 0 ? void 0 : _e[provider])) {
336
336
  window.addEventListener('message', handleAuthWindowMessage);
337
337
  providersWaitingOauthMessage.current = Object.assign(Object.assign({}, providersWaitingOauthMessage.current), { [provider]: true });
338
338
  }
@@ -380,10 +380,10 @@ const useSocialAuth = ({ sessionTimeout, authMode, onSettled, onError, }) => {
380
380
  authWindowTimeout = authWindowTimeout * 3;
381
381
  }
382
382
  authWindowInterval.current = setInterval(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
383
- var _g;
383
+ var _h;
384
384
  shouldPool.current = false;
385
385
  // clear all states/listeners, assuming user closed the window before completing oauth
386
- if ((_g = providersWaitingOauthMessage.current) === null || _g === void 0 ? void 0 : _g[provider]) {
386
+ if ((_h = providersWaitingOauthMessage.current) === null || _h === void 0 ? void 0 : _h[provider]) {
387
387
  clearListeners();
388
388
  handleError(types.SocialOAuthErrorCode.OAUTH_WINDOW_TIMEOUT, `Connecting ${provider} account window timeout.`);
389
389
  }
@@ -12,8 +12,8 @@ export declare const useSocialAuth: ({ sessionTimeout, authMode, onSettled, onEr
12
12
  readonly checkValidProvider: (provider: ProviderEnum) => boolean;
13
13
  readonly connectSocialAccount: ({ provider, validator, captchaToken, }: {
14
14
  provider: ProviderEnum;
15
- validator?: ((provider: ProviderEnum) => boolean) | undefined;
16
- captchaToken?: string | undefined;
15
+ validator?: (provider: ProviderEnum) => boolean;
16
+ captchaToken?: string;
17
17
  }) => Promise<void>;
18
18
  readonly error: SocialOAuthError | undefined;
19
19
  readonly handleError: (code: SocialOAuthErrorCode, message: string) => void;
@@ -218,8 +218,8 @@ const useSocialAuth = ({ sessionTimeout, authMode, onSettled, onError, }) => {
218
218
  handleError(SocialOAuthErrorCode.GENERAL_ERROR, error);
219
219
  }
220
220
  });
221
- const connectSocialAccount = ({ provider, validator, captchaToken, }) => __awaiter(void 0, void 0, void 0, function* () {
222
- var _c, _d;
221
+ const connectSocialAccount = (_c) => __awaiter(void 0, [_c], void 0, function* ({ provider, validator, captchaToken, }) {
222
+ var _d, _e;
223
223
  clearInterval(authWindowInterval.current);
224
224
  clearError();
225
225
  setIsProcessing(true);
@@ -242,9 +242,9 @@ const useSocialAuth = ({ sessionTimeout, authMode, onSettled, onError, }) => {
242
242
  providersWaitingOauthMessage.current = Object.assign(Object.assign({}, providersWaitingOauthMessage.current), { [provider]: false });
243
243
  };
244
244
  const handleAuthWindowMessage = (event) => __awaiter(void 0, void 0, void 0, function* () {
245
- var _e, _f;
245
+ var _f, _g;
246
246
  const message = event.data;
247
- const apiProvider = getProviderByType((_e = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _e !== void 0 ? _e : [], provider);
247
+ const apiProvider = getProviderByType((_f = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _f !== void 0 ? _f : [], provider);
248
248
  if (!(apiProvider === null || apiProvider === void 0 ? void 0 : apiProvider.redirectUrl)) {
249
249
  return;
250
250
  }
@@ -282,7 +282,7 @@ const useSocialAuth = ({ sessionTimeout, authMode, onSettled, onError, }) => {
282
282
  return;
283
283
  }
284
284
  setIsProcessing(true);
285
- if (!((_f = providersWaitingOauthMessage.current) === null || _f === void 0 ? void 0 : _f[provider])) {
285
+ if (!((_g = providersWaitingOauthMessage.current) === null || _g === void 0 ? void 0 : _g[provider])) {
286
286
  handleError(SocialOAuthErrorCode.SESSION_TIMEOUT, `Connecting ${provider} account session timeout.`);
287
287
  return;
288
288
  }
@@ -323,12 +323,12 @@ const useSocialAuth = ({ sessionTimeout, authMode, onSettled, onError, }) => {
323
323
  }
324
324
  setIsProcessing(false);
325
325
  });
326
- const loginUrl = getOauthLoginUrl((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _c !== void 0 ? _c : [], provider);
326
+ const loginUrl = getOauthLoginUrl((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) !== null && _d !== void 0 ? _d : [], provider);
327
327
  if (!loginUrl) {
328
328
  handleError(SocialOAuthErrorCode.NO_OAUTH_URL, `Failed to get login url to connect social account: ${provider}`);
329
329
  return;
330
330
  }
331
- if (!((_d = providersWaitingOauthMessage.current) === null || _d === void 0 ? void 0 : _d[provider])) {
331
+ if (!((_e = providersWaitingOauthMessage.current) === null || _e === void 0 ? void 0 : _e[provider])) {
332
332
  window.addEventListener('message', handleAuthWindowMessage);
333
333
  providersWaitingOauthMessage.current = Object.assign(Object.assign({}, providersWaitingOauthMessage.current), { [provider]: true });
334
334
  }
@@ -376,10 +376,10 @@ const useSocialAuth = ({ sessionTimeout, authMode, onSettled, onError, }) => {
376
376
  authWindowTimeout = authWindowTimeout * 3;
377
377
  }
378
378
  authWindowInterval.current = setInterval(() => __awaiter(void 0, void 0, void 0, function* () {
379
- var _g;
379
+ var _h;
380
380
  shouldPool.current = false;
381
381
  // clear all states/listeners, assuming user closed the window before completing oauth
382
- if ((_g = providersWaitingOauthMessage.current) === null || _g === void 0 ? void 0 : _g[provider]) {
382
+ if ((_h = providersWaitingOauthMessage.current) === null || _h === void 0 ? void 0 : _h[provider]) {
383
383
  clearListeners();
384
384
  handleError(SocialOAuthErrorCode.OAUTH_WINDOW_TIMEOUT, `Connecting ${provider} account window timeout.`);
385
385
  }
@@ -73,7 +73,7 @@ require('../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/Passke
73
73
  var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
74
74
 
75
75
  /** Saves the values updated by the user */
76
- const saveUserValues = ({ fields: newValues, updateUserResult: { isEmailVerificationRequired }, }, setShowAuthFlow, setView, resolve, reject) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
76
+ const saveUserValues = (_a, setShowAuthFlow_1, setView_1, resolve_1, reject_1) => _tslib.__awaiter(void 0, [_a, setShowAuthFlow_1, setView_1, resolve_1, reject_1], void 0, function* ({ fields: newValues, updateUserResult: { isEmailVerificationRequired }, }, setShowAuthFlow, setView, resolve, reject) {
77
77
  // If no verification is needed, we are done
78
78
  if (!isEmailVerificationRequired) {
79
79
  resolve(newValues);
@@ -69,7 +69,7 @@ import '../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/Passkey
69
69
  import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
70
70
 
71
71
  /** Saves the values updated by the user */
72
- const saveUserValues = ({ fields: newValues, updateUserResult: { isEmailVerificationRequired }, }, setShowAuthFlow, setView, resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
72
+ const saveUserValues = (_a, setShowAuthFlow_1, setView_1, resolve_1, reject_1) => __awaiter(void 0, [_a, setShowAuthFlow_1, setView_1, resolve_1, reject_1], void 0, function* ({ fields: newValues, updateUserResult: { isEmailVerificationRequired }, }, setShowAuthFlow, setView, resolve, reject) {
73
73
  // If no verification is needed, we are done
74
74
  if (!isEmailVerificationRequired) {
75
75
  resolve(newValues);