@dynamic-labs/sdk-react-core 1.1.0-alpha.25 → 1.1.0-alpha.26

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 (54) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +10 -10
  5. package/src/lib/components/Icon/Icon.cjs +1 -0
  6. package/src/lib/components/Icon/Icon.js +1 -0
  7. package/src/lib/components/Icon/Icon.types.d.ts +1 -1
  8. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +13 -60
  9. package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +1 -0
  10. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +13 -60
  11. package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.cjs +97 -0
  12. package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.d.ts +9 -0
  13. package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.js +93 -0
  14. package/src/lib/components/RetrySendVerificationCodeSection/index.d.ts +1 -0
  15. package/src/lib/context/DynamicContext/DynamicContext.cjs +2 -2
  16. package/src/lib/context/DynamicContext/DynamicContext.js +2 -2
  17. package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +4 -0
  18. package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +4 -0
  19. package/src/lib/context/DynamicContext/types/index.d.ts +3 -2
  20. package/src/lib/context/DynamicContext/useCustomerCallbacks/types.d.ts +2 -4
  21. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +4 -50
  22. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.d.ts +1 -1
  23. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +4 -50
  24. package/src/lib/events/dynamicEvents.d.ts +2 -0
  25. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +1 -2
  26. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +1 -2
  27. package/src/lib/styles/index.shadow.cjs +1 -1
  28. package/src/lib/styles/index.shadow.js +1 -1
  29. package/src/lib/utils/functions/index.d.ts +0 -1
  30. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +6 -6
  31. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +6 -6
  32. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +4 -5
  33. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +4 -5
  34. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +38 -5
  35. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +16 -5
  36. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +39 -6
  37. package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +3 -2
  38. package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +3 -2
  39. package/src/lib/views/EmailVerification/EmailVerification.cjs +5 -13
  40. package/src/lib/views/EmailVerification/EmailVerification.js +5 -13
  41. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -1
  42. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -1
  43. package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +1 -2
  44. package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +1 -2
  45. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +6 -1
  46. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +6 -1
  47. package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs +1 -1
  48. package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.js +1 -1
  49. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -1
  50. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -1
  51. package/src/lib/utils/functions/sendTransactionWithAutoNonce/index.d.ts +0 -1
  52. package/src/lib/utils/functions/sendTransactionWithAutoNonce/sendTransactionWithAutoNonce.cjs +0 -49
  53. package/src/lib/utils/functions/sendTransactionWithAutoNonce/sendTransactionWithAutoNonce.d.ts +0 -18
  54. package/src/lib/utils/functions/sendTransactionWithAutoNonce/sendTransactionWithAutoNonce.js +0 -44
@@ -2,13 +2,14 @@ import { Dispatch, MutableRefObject, ReactNode, SetStateAction } from 'react';
2
2
  import { DynamicJwt, NameServiceData, ProjectSettings, SdkView } from '@dynamic-labs/sdk-api';
3
3
  import { NetworkConfigurationMap, SocialProviderFilter, WalletUiUtils } from '@dynamic-labs/types';
4
4
  import { Chain, FetchPublicAddressOpts, WalletConnector } from '@dynamic-labs/wallet-connector-core';
5
+ import { PasskeySuccessEnum } from '../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner';
5
6
  import { AccessDeniedCustomButton, AccountSwitchState, AuthModeType, AwaitingSignatureState, ChainToWalletMap, DynamicEventsCallbacks, DynamicRPCProviders, MultiWalletWidgetState, UserProfile, Wallet, WalletOption, WalletWithAction } from '../../../shared';
6
7
  import { SocialNetworkIconType } from '../../../utils/functions/getSocialNetworkIcon';
7
8
  import { MultiWalletWidgetStateSetter } from '../../../utils/hooks/multiWallet';
9
+ import { ConnectWalletOptions } from '../../../utils/hooks/useConnectWallet/useConnectWallet';
8
10
  import { ThemeData, ThemeSetting } from '../../ThemeContext';
9
11
  import { DisplayOrder, SetDisplayOrderPriority, SetShowAuthFlow } from '../hooks';
10
12
  import { SetCallbackType } from '../useCustomerCallbacks';
11
- import { PasskeySuccessEnum } from '../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner';
12
13
  export type ChainsToConnect = {
13
14
  chain: Chain;
14
15
  chainId?: number;
@@ -33,7 +34,7 @@ export interface IDynamicContext {
33
34
  authorizationViewDisplayOrder: DisplayOrder;
34
35
  awaitingSignatureState: AwaitingSignatureState;
35
36
  clearStatesOnBackClick: () => void;
36
- connectWallet: (walletConnector: WalletConnector, fetchPublicAddressOpts?: FetchPublicAddressOpts, shouldCallCallback?: boolean) => Promise<ConnectWalletResult | undefined>;
37
+ connectWallet: (walletConnector: WalletConnector, fetchPublicAddressOpts?: FetchPublicAddressOpts, options?: ConnectWalletOptions) => Promise<ConnectWalletResult | undefined>;
37
38
  connectedWallets: Wallet[];
38
39
  linkedWallets: Wallet[];
39
40
  locale: {
@@ -1,7 +1,7 @@
1
1
  import { JwtVerifiedCredential } from '@dynamic-labs/sdk-api';
2
- import { AuthModeType, OnAuthSuccess, onConnect, OnEmbeddedWalletCreated, OnLinkSuccess, OnUserProfileUpdate, UserProfile, Wallet } from '../../../shared/types';
2
+ import { OnAuthSuccess, OnEmbeddedWalletCreated, OnLinkSuccess, OnUserProfileUpdate, UserProfile, Wallet } from '../../../shared/types';
3
3
  import { IDynamicContext } from '../types';
4
- export type Callback = 'authSuccess' | 'linkSuccess' | 'userProfileUpdate' | 'connectSuccess' | 'embeddedWalletCreated';
4
+ export type Callback = 'authSuccess' | 'linkSuccess' | 'userProfileUpdate' | 'embeddedWalletCreated';
5
5
  export type CallbackParams = {
6
6
  /** For embedded wallet events */
7
7
  email?: string;
@@ -10,10 +10,8 @@ export type CallbackParams = {
10
10
  walletId?: string;
11
11
  };
12
12
  export type UseCustomerCallbacksArgs = {
13
- authMode: AuthModeType;
14
13
  callbacks: {
15
14
  onAuthSuccess?: OnAuthSuccess;
16
- onConnect?: onConnect;
17
15
  onLinkSuccess?: OnLinkSuccess;
18
16
  onUserProfileUpdate?: OnUserProfileUpdate;
19
17
  onEmbeddedWalletCreated?: OnEmbeddedWalletCreated;
@@ -20,9 +20,8 @@ require('../../../../../_virtual/_tslib.cjs');
20
20
  require('@dynamic-labs/multi-wallet');
21
21
  var getAuthToken = require('../../../utils/functions/getAuthToken/getAuthToken.cjs');
22
22
  require('viem/chains');
23
- var isConnectOnly = require('../../../utils/hooks/authenticationHooks/helpers/isConnectOnly.cjs');
24
23
 
25
- const useCustomerCallbacks = ({ callbacks: { onAuthSuccess, onLinkSuccess, onUserProfileUpdate, onConnect, onEmbeddedWalletCreated, }, handleLogOut, primaryWallet, secondaryWallets, user, isAuthenticated, authMode, setIsVerificationInProgress, }) => {
24
+ const useCustomerCallbacks = ({ callbacks: { onAuthSuccess, onLinkSuccess, onUserProfileUpdate, onEmbeddedWalletCreated, }, handleLogOut, primaryWallet, secondaryWallets, user, isAuthenticated, setIsVerificationInProgress, }) => {
26
25
  const [callbackQueue, setCallbackQueue] = React.useState([]);
27
26
  /** Gets the wallet from its id */
28
27
  const getWallet = React.useCallback((id) => {
@@ -31,39 +30,6 @@ const useCustomerCallbacks = ({ callbacks: { onAuthSuccess, onLinkSuccess, onUse
31
30
  ? (_a = [primaryWallet, ...secondaryWallets].find((wallet) => (wallet === null || wallet === void 0 ? void 0 : wallet.id) === id)) !== null && _a !== void 0 ? _a : undefined
32
31
  : undefined;
33
32
  }, [primaryWallet, secondaryWallets]);
34
- const isConnectOnlyAndCallbackIsConnectSuccess = React.useCallback((next) => isConnectOnly.isConnectOnly(user, authMode) &&
35
- Boolean(primaryWallet) &&
36
- next === 'connectSuccess', [authMode, user, primaryWallet]);
37
- const handleConnectOnlyAndCallbackIsConnectSuccess = React.useCallback(() => {
38
- const [{ callback: peek, params }] = callbackQueue;
39
- // we need to handle connect-only different way
40
- // for connect-only we don't have user object or JWT (needed in connect-and-sign)
41
- // so we need to handle connect-only before the early returns
42
- if (isConnectOnlyAndCallbackIsConnectSuccess(peek)) {
43
- const updatedQueue = [...callbackQueue];
44
- updatedQueue.shift();
45
- setCallbackQueue(updatedQueue);
46
- try {
47
- setIsVerificationInProgress(false);
48
- const wallet = getWallet(params === null || params === void 0 ? void 0 : params.walletId);
49
- onConnect === null || onConnect === void 0 ? void 0 : onConnect({
50
- wallet,
51
- walletConnector: wallet === null || wallet === void 0 ? void 0 : wallet.connector,
52
- });
53
- }
54
- catch (e) {
55
- logger.logger.error('Error calling onConnect: ', e);
56
- }
57
- return false;
58
- }
59
- return true;
60
- }, [
61
- callbackQueue,
62
- getWallet,
63
- isConnectOnlyAndCallbackIsConnectSuccess,
64
- onConnect,
65
- setIsVerificationInProgress,
66
- ]);
67
33
  const handleNextCallback = React.useCallback((next, authToken, user) => {
68
34
  var _a, _b;
69
35
  switch (next === null || next === void 0 ? void 0 : next.callback) {
@@ -129,32 +95,20 @@ const useCustomerCallbacks = ({ callbacks: { onAuthSuccess, onLinkSuccess, onUse
129
95
  setIsVerificationInProgress,
130
96
  ]);
131
97
  React.useEffect(() => {
132
- if (!callbackQueue.length)
133
- return;
134
- if (!handleConnectOnlyAndCallbackIsConnectSuccess())
135
- return;
136
- if (!user)
98
+ if (!callbackQueue.length || !user)
137
99
  return;
138
100
  const authToken = getAuthToken.getAuthToken();
139
- if (!authToken)
140
- return;
141
101
  // checks if user logged in with a wallet, so we need to wait
142
102
  // for the primary wallet state to be set
143
103
  // if user logged in with email without embedded wallet, then
144
104
  // there is no wallet so we can go ahead and run the callback
145
- if (user.isAuthenticatedWithAWallet && !primaryWallet) {
105
+ if (!authToken || (user.isAuthenticatedWithAWallet && !primaryWallet)) {
146
106
  return;
147
107
  }
148
108
  const updatedQueue = [...callbackQueue];
149
109
  handleNextCallback(updatedQueue.shift(), authToken, user);
150
110
  setCallbackQueue(updatedQueue);
151
- }, [
152
- callbackQueue,
153
- handleConnectOnlyAndCallbackIsConnectSuccess,
154
- handleNextCallback,
155
- primaryWallet,
156
- user,
157
- ]);
111
+ }, [callbackQueue, handleNextCallback, primaryWallet, user]);
158
112
  const setCallback = (callback, params) => {
159
113
  setCallbackQueue((prev) => [...prev, { callback, params }]);
160
114
  };
@@ -1,4 +1,4 @@
1
1
  import { SetCallbackType, UseCustomerCallbacksArgs } from './types';
2
- export declare const useCustomerCallbacks: ({ callbacks: { onAuthSuccess, onLinkSuccess, onUserProfileUpdate, onConnect, onEmbeddedWalletCreated, }, handleLogOut, primaryWallet, secondaryWallets, user, isAuthenticated, authMode, setIsVerificationInProgress, }: UseCustomerCallbacksArgs) => {
2
+ export declare const useCustomerCallbacks: ({ callbacks: { onAuthSuccess, onLinkSuccess, onUserProfileUpdate, onEmbeddedWalletCreated, }, handleLogOut, primaryWallet, secondaryWallets, user, isAuthenticated, setIsVerificationInProgress, }: UseCustomerCallbacksArgs) => {
3
3
  setCallback: SetCallbackType;
4
4
  };
@@ -16,9 +16,8 @@ import '../../../../../_virtual/_tslib.js';
16
16
  import '@dynamic-labs/multi-wallet';
17
17
  import { getAuthToken } from '../../../utils/functions/getAuthToken/getAuthToken.js';
18
18
  import 'viem/chains';
19
- import { isConnectOnly } from '../../../utils/hooks/authenticationHooks/helpers/isConnectOnly.js';
20
19
 
21
- const useCustomerCallbacks = ({ callbacks: { onAuthSuccess, onLinkSuccess, onUserProfileUpdate, onConnect, onEmbeddedWalletCreated, }, handleLogOut, primaryWallet, secondaryWallets, user, isAuthenticated, authMode, setIsVerificationInProgress, }) => {
20
+ const useCustomerCallbacks = ({ callbacks: { onAuthSuccess, onLinkSuccess, onUserProfileUpdate, onEmbeddedWalletCreated, }, handleLogOut, primaryWallet, secondaryWallets, user, isAuthenticated, setIsVerificationInProgress, }) => {
22
21
  const [callbackQueue, setCallbackQueue] = useState([]);
23
22
  /** Gets the wallet from its id */
24
23
  const getWallet = useCallback((id) => {
@@ -27,39 +26,6 @@ const useCustomerCallbacks = ({ callbacks: { onAuthSuccess, onLinkSuccess, onUse
27
26
  ? (_a = [primaryWallet, ...secondaryWallets].find((wallet) => (wallet === null || wallet === void 0 ? void 0 : wallet.id) === id)) !== null && _a !== void 0 ? _a : undefined
28
27
  : undefined;
29
28
  }, [primaryWallet, secondaryWallets]);
30
- const isConnectOnlyAndCallbackIsConnectSuccess = useCallback((next) => isConnectOnly(user, authMode) &&
31
- Boolean(primaryWallet) &&
32
- next === 'connectSuccess', [authMode, user, primaryWallet]);
33
- const handleConnectOnlyAndCallbackIsConnectSuccess = useCallback(() => {
34
- const [{ callback: peek, params }] = callbackQueue;
35
- // we need to handle connect-only different way
36
- // for connect-only we don't have user object or JWT (needed in connect-and-sign)
37
- // so we need to handle connect-only before the early returns
38
- if (isConnectOnlyAndCallbackIsConnectSuccess(peek)) {
39
- const updatedQueue = [...callbackQueue];
40
- updatedQueue.shift();
41
- setCallbackQueue(updatedQueue);
42
- try {
43
- setIsVerificationInProgress(false);
44
- const wallet = getWallet(params === null || params === void 0 ? void 0 : params.walletId);
45
- onConnect === null || onConnect === void 0 ? void 0 : onConnect({
46
- wallet,
47
- walletConnector: wallet === null || wallet === void 0 ? void 0 : wallet.connector,
48
- });
49
- }
50
- catch (e) {
51
- logger.error('Error calling onConnect: ', e);
52
- }
53
- return false;
54
- }
55
- return true;
56
- }, [
57
- callbackQueue,
58
- getWallet,
59
- isConnectOnlyAndCallbackIsConnectSuccess,
60
- onConnect,
61
- setIsVerificationInProgress,
62
- ]);
63
29
  const handleNextCallback = useCallback((next, authToken, user) => {
64
30
  var _a, _b;
65
31
  switch (next === null || next === void 0 ? void 0 : next.callback) {
@@ -125,32 +91,20 @@ const useCustomerCallbacks = ({ callbacks: { onAuthSuccess, onLinkSuccess, onUse
125
91
  setIsVerificationInProgress,
126
92
  ]);
127
93
  useEffect(() => {
128
- if (!callbackQueue.length)
129
- return;
130
- if (!handleConnectOnlyAndCallbackIsConnectSuccess())
131
- return;
132
- if (!user)
94
+ if (!callbackQueue.length || !user)
133
95
  return;
134
96
  const authToken = getAuthToken();
135
- if (!authToken)
136
- return;
137
97
  // checks if user logged in with a wallet, so we need to wait
138
98
  // for the primary wallet state to be set
139
99
  // if user logged in with email without embedded wallet, then
140
100
  // there is no wallet so we can go ahead and run the callback
141
- if (user.isAuthenticatedWithAWallet && !primaryWallet) {
101
+ if (!authToken || (user.isAuthenticatedWithAWallet && !primaryWallet)) {
142
102
  return;
143
103
  }
144
104
  const updatedQueue = [...callbackQueue];
145
105
  handleNextCallback(updatedQueue.shift(), authToken, user);
146
106
  setCallbackQueue(updatedQueue);
147
- }, [
148
- callbackQueue,
149
- handleConnectOnlyAndCallbackIsConnectSuccess,
150
- handleNextCallback,
151
- primaryWallet,
152
- user,
153
- ]);
107
+ }, [callbackQueue, handleNextCallback, primaryWallet, user]);
154
108
  const setCallback = (callback, params) => {
155
109
  setCallbackQueue((prev) => [...prev, { callback, params }]);
156
110
  };
@@ -15,6 +15,8 @@ export type DynamicEvents = {
15
15
  embeddedWalletRevealCompleted: (wallet: Wallet) => void;
16
16
  embeddedWalletRevealFailed: (error: unknown) => void;
17
17
  logout: () => void;
18
+ /** Triggered when a new wallet is connected in connect-only mode */
19
+ walletConnected: (wallet: Wallet) => void;
18
20
  /** This event is used to trigger logout to be called, DO NOT listen to it. Listen to "logout" instead */
19
21
  triggerLogout: () => void;
20
22
  };
@@ -24,7 +24,6 @@ require('../../context/CaptchaContext/CaptchaContext.cjs');
24
24
  require('../../context/ErrorContext/ErrorContext.cjs');
25
25
  require('@dynamic-labs/multi-wallet');
26
26
  var isMagicConnector = require('../../utils/functions/isMagicConnector/isMagicConnector.cjs');
27
- var sendTransactionWithAutoNonce = require('../../utils/functions/sendTransactionWithAutoNonce/sendTransactionWithAutoNonce.cjs');
28
27
  require('viem/chains');
29
28
  require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
30
29
  require('../../context/AccountExistsContext/AccountExistsContext.cjs');
@@ -96,7 +95,7 @@ const TransactionConfirmationModal = ({ title, handler, onReject, onTransactionR
96
95
  }, [onTransactionResponseSuccess, onReject]);
97
96
  return (jsxRuntime.jsx(Portal.Portal, { handleClose: closeModal, isShown: show, zIndex: index.authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
98
97
  onUnmount: handleOnModalUnmount,
99
- }, children: jsxRuntime.jsx(Modal.Modal, { children: jsxRuntime.jsx(ModalCard.ModalCard, { children: jsxRuntime.jsx(TransactionConfirmationView.TransactionConfirmationView, { provider: provider, transaction: transactionWithGasPrice, title: title, copykey: copykey, mutation: () => sendTransactionWithAutoNonce.sendTransactionWithAutoNonce(walletConnector, transactionWithGasPrice, handler), onClickClose: closeModal, onError: (error) => (errorRef.current = error), displayPoweredByDynamicFooter: true, onSuccess: (transactionResponse) => {
98
+ }, children: jsxRuntime.jsx(Modal.Modal, { children: jsxRuntime.jsx(ModalCard.ModalCard, { children: jsxRuntime.jsx(TransactionConfirmationView.TransactionConfirmationView, { provider: provider, transaction: transactionWithGasPrice, title: title, copykey: copykey, mutation: () => handler(transactionWithGasPrice), onClickClose: closeModal, onError: (error) => (errorRef.current = error), displayPoweredByDynamicFooter: true, onSuccess: (transactionResponse) => {
100
99
  errorRef.current = null;
101
100
  transactionResponseRef.current = transactionResponse;
102
101
  closeModal();
@@ -20,7 +20,6 @@ import '../../context/CaptchaContext/CaptchaContext.js';
20
20
  import '../../context/ErrorContext/ErrorContext.js';
21
21
  import '@dynamic-labs/multi-wallet';
22
22
  import { isMagicConnector } from '../../utils/functions/isMagicConnector/isMagicConnector.js';
23
- import { sendTransactionWithAutoNonce } from '../../utils/functions/sendTransactionWithAutoNonce/sendTransactionWithAutoNonce.js';
24
23
  import 'viem/chains';
25
24
  import '../../context/AccessDeniedContext/AccessDeniedContext.js';
26
25
  import '../../context/AccountExistsContext/AccountExistsContext.js';
@@ -92,7 +91,7 @@ const TransactionConfirmationModal = ({ title, handler, onReject, onTransactionR
92
91
  }, [onTransactionResponseSuccess, onReject]);
93
92
  return (jsx(Portal, { handleClose: closeModal, isShown: show, zIndex: authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
94
93
  onUnmount: handleOnModalUnmount,
95
- }, children: jsx(Modal, { children: jsx(ModalCard, { children: jsx(TransactionConfirmationView, { provider: provider, transaction: transactionWithGasPrice, title: title, copykey: copykey, mutation: () => sendTransactionWithAutoNonce(walletConnector, transactionWithGasPrice, handler), onClickClose: closeModal, onError: (error) => (errorRef.current = error), displayPoweredByDynamicFooter: true, onSuccess: (transactionResponse) => {
94
+ }, children: jsx(Modal, { children: jsx(ModalCard, { children: jsx(TransactionConfirmationView, { provider: provider, transaction: transactionWithGasPrice, title: title, copykey: copykey, mutation: () => handler(transactionWithGasPrice), onClickClose: closeModal, onError: (error) => (errorRef.current = error), displayPoweredByDynamicFooter: true, onSuccess: (transactionResponse) => {
96
95
  errorRef.current = null;
97
96
  transactionResponseRef.current = transactionResponse;
98
97
  closeModal();