@dynamic-labs/sdk-react-core 4.29.1 → 4.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/index.cjs +2 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/lib/Main.cjs +1 -1
- package/src/lib/Main.js +1 -1
- package/src/lib/client/extension/user/useOnboardingCompleteUser/useOnboardingCompleteUser.js +1 -1
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.cjs +11 -13
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.d.ts +2 -1
- package/src/lib/components/TransactionCard/SendBalanceTransactionCard.js +11 -13
- package/src/lib/components/TransactionCard/TransactionCard.cjs +8 -11
- package/src/lib/components/TransactionCard/TransactionCard.js +8 -11
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +2 -2
- package/src/lib/context/DynamicContext/DynamicContext.js +2 -2
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.cjs +2 -2
- package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.js +2 -2
- package/src/lib/utils/hooks/index.d.ts +1 -0
- package/src/lib/utils/hooks/useConnectUnifiedForFunding/useConnectUnifiedForFunding.cjs +201 -0
- package/src/lib/utils/hooks/useConnectUnifiedForFunding/useConnectUnifiedForFunding.js +197 -0
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +5 -2
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.d.ts +1 -1
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +5 -2
- package/src/lib/utils/hooks/usePayWithDynamic/index.d.ts +1 -1
- package/src/lib/utils/hooks/usePayWithDynamic/usePayWithDynamic.cjs +284 -0
- package/src/lib/utils/hooks/usePayWithDynamic/usePayWithDynamic.js +280 -0
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.cjs +1 -0
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.d.ts +2 -0
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.js +1 -0
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -2
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -2
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
require('@dynamic-labs-sdk/client/core');
|
|
9
|
+
require('@dynamic-labs/sdk-api-core');
|
|
10
|
+
require('../../../client/client.cjs');
|
|
11
|
+
require('@dynamic-labs-sdk/client');
|
|
12
|
+
require('../../../config/ApiEndpoint.cjs');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
14
|
+
require('../../constants/values.cjs');
|
|
15
|
+
require('@dynamic-labs/multi-wallet');
|
|
16
|
+
var logger = require('../../../shared/logger.cjs');
|
|
17
|
+
require('../../constants/colors.cjs');
|
|
18
|
+
require('react-international-phone');
|
|
19
|
+
require('@dynamic-labs/iconic');
|
|
20
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
21
|
+
require('react/jsx-runtime');
|
|
22
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
23
|
+
require('@dynamic-labs/wallet-book');
|
|
24
|
+
require('../../../shared/consts/index.cjs');
|
|
25
|
+
require('../../../store/state/nonce/nonce.cjs');
|
|
26
|
+
var projectSettings = require('../../../store/state/projectSettings/projectSettings.cjs');
|
|
27
|
+
require('../../../locale/locale.cjs');
|
|
28
|
+
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
29
|
+
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
30
|
+
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
31
|
+
require('../../../events/dynamicEvents.cjs');
|
|
32
|
+
var useOnboardingCompleteUser = require('../../../client/extension/user/useOnboardingCompleteUser/useOnboardingCompleteUser.cjs');
|
|
33
|
+
var OnrampContext = require('../../../context/OnrampContext/OnrampContext.cjs');
|
|
34
|
+
var useConnectUnifiedForFunding = require('../useConnectUnifiedForFunding/useConnectUnifiedForFunding.cjs');
|
|
35
|
+
var useSocialAccounts = require('../useSocialAccounts/useSocialAccounts.cjs');
|
|
36
|
+
var usePromptAmountAndFundWithWallet = require('../useFundWithWallet/usePromptAmountAndFundWithWallet/usePromptAmountAndFundWithWallet.cjs');
|
|
37
|
+
var usePromptAndFundWithExchange = require('../usePromptAndFundWithExchange/usePromptAndFundWithExchange.cjs');
|
|
38
|
+
var useWalletItemActions = require('../useWalletItemActions/useWalletItemActions.cjs');
|
|
39
|
+
var walletOptions = require('../../../store/state/walletOptions/walletOptions.cjs');
|
|
40
|
+
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
41
|
+
require('../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
42
|
+
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
43
|
+
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
44
|
+
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
45
|
+
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
46
|
+
require('../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
47
|
+
require('../../../store/state/authMode/authMode.cjs');
|
|
48
|
+
require('../../../context/VerificationContext/VerificationContext.cjs');
|
|
49
|
+
require('react-dom');
|
|
50
|
+
require('../../functions/compareChains/compareChains.cjs');
|
|
51
|
+
require('../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
|
|
52
|
+
require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
53
|
+
require('../useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
54
|
+
require('bs58');
|
|
55
|
+
require('yup');
|
|
56
|
+
require('../../../context/MockContext/MockContext.cjs');
|
|
57
|
+
require('../../../views/CollectUserDataView/useFields.cjs');
|
|
58
|
+
require('../../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
59
|
+
require('../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
60
|
+
require('@dynamic-labs/rpc-providers');
|
|
61
|
+
require('react-i18next');
|
|
62
|
+
require('../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
63
|
+
require('../../../components/Alert/Alert.cjs');
|
|
64
|
+
require('../../../context/WalletContext/WalletContext.cjs');
|
|
65
|
+
require('../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
66
|
+
require('../../../components/IconButton/IconButton.cjs');
|
|
67
|
+
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
68
|
+
require('../../../components/Input/Input.cjs');
|
|
69
|
+
require('../../../components/IsBrowser/IsBrowser.cjs');
|
|
70
|
+
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
71
|
+
require('../../../components/OverlayCard/OverlayCard.cjs');
|
|
72
|
+
require('../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
73
|
+
require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
74
|
+
require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
75
|
+
require('../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
76
|
+
require('../../../components/Popper/Popper/Popper.cjs');
|
|
77
|
+
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
78
|
+
require('react-focus-lock');
|
|
79
|
+
require('qrcode');
|
|
80
|
+
require('formik');
|
|
81
|
+
require('../useSubdomainCheck/useSubdomainCheck.cjs');
|
|
82
|
+
require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
83
|
+
require('../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
84
|
+
require('../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
85
|
+
require('../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
86
|
+
require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
87
|
+
require('@hcaptcha/react-hcaptcha');
|
|
88
|
+
require('../../../context/LoadingContext/LoadingContext.cjs');
|
|
89
|
+
require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
90
|
+
require('../../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
91
|
+
require('../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
|
|
92
|
+
require('../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
93
|
+
require('../../../context/FooterAnimationContext/index.cjs');
|
|
94
|
+
require('@dynamic-labs/types');
|
|
95
|
+
require('../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
96
|
+
require('../../../views/MfaChooseDeviceView/getMfaOptions/getMfaOptions.cjs');
|
|
97
|
+
require('../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
98
|
+
require('../../../store/state/sendBalances.cjs');
|
|
99
|
+
require('../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
100
|
+
require('../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
101
|
+
require('../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
102
|
+
require('../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
103
|
+
require('../../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.cjs');
|
|
104
|
+
require('../../../../index.cjs');
|
|
105
|
+
require('../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
106
|
+
require('../../../store/state/tokenBalances.cjs');
|
|
107
|
+
require('../../../store/state/multichainBalances.cjs');
|
|
108
|
+
require('../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
109
|
+
var useInternalDynamicContext = require('../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
|
|
110
|
+
|
|
111
|
+
const usePayWithDynamic = () => {
|
|
112
|
+
const connectUnifiedForFunding = useConnectUnifiedForFunding.useConnectUnifiedForFunding();
|
|
113
|
+
const projectSettings$1 = projectSettings.useProjectSettings();
|
|
114
|
+
const { linkSocialAccount, signInWithSocialAccount } = useSocialAccounts.useSocialAccounts();
|
|
115
|
+
const user = useOnboardingCompleteUser.useOnboardingCompleteUser();
|
|
116
|
+
const { openOnramp, setEnabledOnrampProvidersTargetValue } = OnrampContext.useOnrampContext();
|
|
117
|
+
const promptWallet = usePromptAmountAndFundWithWallet.usePromptAmountAndFundWithWallet();
|
|
118
|
+
const promptExchange = usePromptAndFundWithExchange.usePromptAmountAndFundWithExchange();
|
|
119
|
+
const { handleWalletItemClick } = useWalletItemActions.useWalletItemActions();
|
|
120
|
+
const { walletConnectorOptions } = walletOptions.getWalletOptions();
|
|
121
|
+
const { setShowAuthFlow, setShowDynamicUserProfile } = useInternalDynamicContext.useInternalDynamicContext();
|
|
122
|
+
// Flow for funding via wallet
|
|
123
|
+
const handleWalletFlow = React.useCallback(({ wallet, props, onBack }) => {
|
|
124
|
+
// If user is not onboarded, trigger wallet connector UI
|
|
125
|
+
if (!user) {
|
|
126
|
+
const option = walletConnectorOptions.find(({ key }) => key === wallet.connector.key);
|
|
127
|
+
if (option)
|
|
128
|
+
handleWalletItemClick(option);
|
|
129
|
+
}
|
|
130
|
+
// Prompt for amount and execute wallet funding (shows deposit screen)
|
|
131
|
+
promptWallet({
|
|
132
|
+
amount: { rule: 'exact', value: props.tokenAmount },
|
|
133
|
+
destinationAddress: props.destinationAddress,
|
|
134
|
+
network: props.network,
|
|
135
|
+
onBack,
|
|
136
|
+
token: { rule: 'exact-with-amount', value: props.tokenSymbol },
|
|
137
|
+
wallet: wallet,
|
|
138
|
+
});
|
|
139
|
+
setShowAuthFlow(false);
|
|
140
|
+
}, [
|
|
141
|
+
handleWalletItemClick,
|
|
142
|
+
promptWallet,
|
|
143
|
+
setShowAuthFlow,
|
|
144
|
+
user,
|
|
145
|
+
walletConnectorOptions,
|
|
146
|
+
]);
|
|
147
|
+
// Flow for linking or signing in with social account before exchange
|
|
148
|
+
const handleSocialConnect = React.useCallback((_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ provider, exchange, props, isSocialProviderAlreadyVerified, }) {
|
|
149
|
+
// if connected social return since already signed in
|
|
150
|
+
if (isSocialProviderAlreadyVerified) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
const payload = {
|
|
154
|
+
payingWithDynamic: {
|
|
155
|
+
chainName: props.chainName,
|
|
156
|
+
destinationAddress: props.destinationAddress,
|
|
157
|
+
network: props.network,
|
|
158
|
+
tokenAmount: props.tokenAmount,
|
|
159
|
+
tokenSymbol: props.tokenSymbol,
|
|
160
|
+
},
|
|
161
|
+
triggerFundFromExchangeOnSuccess: exchange,
|
|
162
|
+
};
|
|
163
|
+
if (user) {
|
|
164
|
+
// link if user exists
|
|
165
|
+
yield linkSocialAccount(provider, payload);
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
// sign in if no user
|
|
169
|
+
yield signInWithSocialAccount(provider, payload);
|
|
170
|
+
}
|
|
171
|
+
return true;
|
|
172
|
+
}), [linkSocialAccount, signInWithSocialAccount, user]);
|
|
173
|
+
// exchange flow
|
|
174
|
+
const handleExchangeFlow = React.useCallback((_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({ exchange, props, onBack }) {
|
|
175
|
+
var _c, _d, _e, _f, _g;
|
|
176
|
+
const fullExchange = (_c = projectSettings$1 === null || projectSettings$1 === void 0 ? void 0 : projectSettings$1.exchanges) === null || _c === void 0 ? void 0 : _c.find((e) => e.exchange === exchange);
|
|
177
|
+
// Social provider for this exchange, if any
|
|
178
|
+
const provider = fullExchange === null || fullExchange === void 0 ? void 0 : fullExchange.socialProvider;
|
|
179
|
+
const isProviderSocialConnectEnabled = provider &&
|
|
180
|
+
Boolean((_e = (_d = projectSettings$1 === null || projectSettings$1 === void 0 ? void 0 : projectSettings$1.providers) === null || _d === void 0 ? void 0 : _d.find((p) => p.provider === provider)) === null || _e === void 0 ? void 0 : _e.enabledAt);
|
|
181
|
+
// Check if user already verified this social provider
|
|
182
|
+
const isSocialProviderAlreadyVerified = (_g = (_f = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _f === void 0 ? void 0 : _f.some((c) => c.oauthProvider === provider)) !== null && _g !== void 0 ? _g : false;
|
|
183
|
+
// If exchange requires social connect, handle that first
|
|
184
|
+
if (isProviderSocialConnectEnabled && provider) {
|
|
185
|
+
const handled = yield handleSocialConnect({
|
|
186
|
+
exchange,
|
|
187
|
+
isSocialProviderAlreadyVerified,
|
|
188
|
+
props,
|
|
189
|
+
provider,
|
|
190
|
+
});
|
|
191
|
+
// Social connect flow opened, stop here
|
|
192
|
+
if (handled)
|
|
193
|
+
return;
|
|
194
|
+
// If already connected, prompt amount and fund with exchange
|
|
195
|
+
promptExchange({
|
|
196
|
+
exchange,
|
|
197
|
+
onBack,
|
|
198
|
+
payingWithDynamic: props,
|
|
199
|
+
});
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
// No social provider = use on-ramp provider if configured
|
|
203
|
+
if (fullExchange === null || fullExchange === void 0 ? void 0 : fullExchange.onRampProvider) {
|
|
204
|
+
yield openOnramp({
|
|
205
|
+
address: props.destinationAddress,
|
|
206
|
+
chainName: props.chainName,
|
|
207
|
+
network: String(props.network),
|
|
208
|
+
onrampProvider: fullExchange.onRampProvider,
|
|
209
|
+
overrideOnRamp: true,
|
|
210
|
+
payingWithDynamic: true,
|
|
211
|
+
token: props.tokenSymbol,
|
|
212
|
+
tokenAmount: props.tokenAmount,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}), [
|
|
216
|
+
projectSettings$1 === null || projectSettings$1 === void 0 ? void 0 : projectSettings$1.exchanges,
|
|
217
|
+
projectSettings$1 === null || projectSettings$1 === void 0 ? void 0 : projectSettings$1.providers,
|
|
218
|
+
user === null || user === void 0 ? void 0 : user.verifiedCredentials,
|
|
219
|
+
handleSocialConnect,
|
|
220
|
+
promptExchange,
|
|
221
|
+
openOnramp,
|
|
222
|
+
]);
|
|
223
|
+
const payWithDynamic = React.useCallback((props) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
224
|
+
try {
|
|
225
|
+
setEnabledOnrampProvidersTargetValue({
|
|
226
|
+
address: props.destinationAddress,
|
|
227
|
+
chainName: props.chainName,
|
|
228
|
+
network: String(props.network),
|
|
229
|
+
token: props.tokenSymbol,
|
|
230
|
+
tokenAmount: props.tokenAmount,
|
|
231
|
+
});
|
|
232
|
+
const result = yield connectUnifiedForFunding({
|
|
233
|
+
initiatedByWidget: false,
|
|
234
|
+
});
|
|
235
|
+
if (result.kind === 'wallet') {
|
|
236
|
+
handleWalletFlow({
|
|
237
|
+
onBack: () => {
|
|
238
|
+
setShowAuthFlow(true);
|
|
239
|
+
setShowDynamicUserProfile(false);
|
|
240
|
+
payWithDynamic(props);
|
|
241
|
+
},
|
|
242
|
+
props,
|
|
243
|
+
wallet: result.wallet,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
else if (result.kind === 'exchange') {
|
|
247
|
+
yield handleExchangeFlow({
|
|
248
|
+
exchange: result.exchange,
|
|
249
|
+
onBack: () => {
|
|
250
|
+
setShowAuthFlow(true);
|
|
251
|
+
setShowDynamicUserProfile(false);
|
|
252
|
+
payWithDynamic(props);
|
|
253
|
+
},
|
|
254
|
+
props,
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
yield openOnramp({
|
|
259
|
+
address: props.destinationAddress,
|
|
260
|
+
chainName: props.chainName,
|
|
261
|
+
network: String(props.network),
|
|
262
|
+
onrampProvider: result.onramp.id,
|
|
263
|
+
payingWithDynamic: true,
|
|
264
|
+
token: props.tokenSymbol,
|
|
265
|
+
tokenAmount: props.tokenAmount,
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
catch (error) {
|
|
270
|
+
logger.logger.error('usePayWithDynamic failed', error);
|
|
271
|
+
}
|
|
272
|
+
}), [
|
|
273
|
+
setEnabledOnrampProvidersTargetValue,
|
|
274
|
+
connectUnifiedForFunding,
|
|
275
|
+
handleWalletFlow,
|
|
276
|
+
setShowAuthFlow,
|
|
277
|
+
setShowDynamicUserProfile,
|
|
278
|
+
handleExchangeFlow,
|
|
279
|
+
openOnramp,
|
|
280
|
+
]);
|
|
281
|
+
return payWithDynamic;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
exports.usePayWithDynamic = usePayWithDynamic;
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import '@dynamic-labs-sdk/client/core';
|
|
5
|
+
import '@dynamic-labs/sdk-api-core';
|
|
6
|
+
import '../../../client/client.js';
|
|
7
|
+
import '@dynamic-labs-sdk/client';
|
|
8
|
+
import '../../../config/ApiEndpoint.js';
|
|
9
|
+
import '@dynamic-labs/utils';
|
|
10
|
+
import '../../constants/values.js';
|
|
11
|
+
import '@dynamic-labs/multi-wallet';
|
|
12
|
+
import { logger } from '../../../shared/logger.js';
|
|
13
|
+
import '../../constants/colors.js';
|
|
14
|
+
import 'react-international-phone';
|
|
15
|
+
import '@dynamic-labs/iconic';
|
|
16
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
17
|
+
import 'react/jsx-runtime';
|
|
18
|
+
import '../../../context/ViewContext/ViewContext.js';
|
|
19
|
+
import '@dynamic-labs/wallet-book';
|
|
20
|
+
import '../../../shared/consts/index.js';
|
|
21
|
+
import '../../../store/state/nonce/nonce.js';
|
|
22
|
+
import { useProjectSettings } from '../../../store/state/projectSettings/projectSettings.js';
|
|
23
|
+
import '../../../locale/locale.js';
|
|
24
|
+
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
25
|
+
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
26
|
+
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
27
|
+
import '../../../events/dynamicEvents.js';
|
|
28
|
+
import { useOnboardingCompleteUser } from '../../../client/extension/user/useOnboardingCompleteUser/useOnboardingCompleteUser.js';
|
|
29
|
+
import { useOnrampContext } from '../../../context/OnrampContext/OnrampContext.js';
|
|
30
|
+
import { useConnectUnifiedForFunding } from '../useConnectUnifiedForFunding/useConnectUnifiedForFunding.js';
|
|
31
|
+
import { useSocialAccounts } from '../useSocialAccounts/useSocialAccounts.js';
|
|
32
|
+
import { usePromptAmountAndFundWithWallet } from '../useFundWithWallet/usePromptAmountAndFundWithWallet/usePromptAmountAndFundWithWallet.js';
|
|
33
|
+
import { usePromptAmountAndFundWithExchange } from '../usePromptAndFundWithExchange/usePromptAndFundWithExchange.js';
|
|
34
|
+
import { useWalletItemActions } from '../useWalletItemActions/useWalletItemActions.js';
|
|
35
|
+
import { getWalletOptions } from '../../../store/state/walletOptions/walletOptions.js';
|
|
36
|
+
import '../../../context/DynamicContext/DynamicContext.js';
|
|
37
|
+
import '../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
38
|
+
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
39
|
+
import '../../../context/ErrorContext/ErrorContext.js';
|
|
40
|
+
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
41
|
+
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
42
|
+
import '../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
43
|
+
import '../../../store/state/authMode/authMode.js';
|
|
44
|
+
import '../../../context/VerificationContext/VerificationContext.js';
|
|
45
|
+
import 'react-dom';
|
|
46
|
+
import '../../functions/compareChains/compareChains.js';
|
|
47
|
+
import '../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
|
|
48
|
+
import '../../../context/ThemeContext/ThemeContext.js';
|
|
49
|
+
import '../useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
50
|
+
import 'bs58';
|
|
51
|
+
import 'yup';
|
|
52
|
+
import '../../../context/MockContext/MockContext.js';
|
|
53
|
+
import '../../../views/CollectUserDataView/useFields.js';
|
|
54
|
+
import '../../../context/FieldsStateContext/FieldsStateContext.js';
|
|
55
|
+
import '../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
56
|
+
import '@dynamic-labs/rpc-providers';
|
|
57
|
+
import 'react-i18next';
|
|
58
|
+
import '../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
59
|
+
import '../../../components/Alert/Alert.js';
|
|
60
|
+
import '../../../context/WalletContext/WalletContext.js';
|
|
61
|
+
import '../../../components/ShadowDOM/ShadowDOM.js';
|
|
62
|
+
import '../../../components/IconButton/IconButton.js';
|
|
63
|
+
import '../../../components/InlineWidget/InlineWidget.js';
|
|
64
|
+
import '../../../components/Input/Input.js';
|
|
65
|
+
import '../../../components/IsBrowser/IsBrowser.js';
|
|
66
|
+
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
67
|
+
import '../../../components/OverlayCard/OverlayCard.js';
|
|
68
|
+
import '../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
69
|
+
import '../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
70
|
+
import '../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
71
|
+
import '../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
72
|
+
import '../../../components/Popper/Popper/Popper.js';
|
|
73
|
+
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
74
|
+
import 'react-focus-lock';
|
|
75
|
+
import 'qrcode';
|
|
76
|
+
import 'formik';
|
|
77
|
+
import '../useSubdomainCheck/useSubdomainCheck.js';
|
|
78
|
+
import '../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
79
|
+
import '../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
80
|
+
import '../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
81
|
+
import '../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
82
|
+
import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
83
|
+
import '@hcaptcha/react-hcaptcha';
|
|
84
|
+
import '../../../context/LoadingContext/LoadingContext.js';
|
|
85
|
+
import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
86
|
+
import '../../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.js';
|
|
87
|
+
import '../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
|
|
88
|
+
import '../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
89
|
+
import '../../../context/FooterAnimationContext/index.js';
|
|
90
|
+
import '@dynamic-labs/types';
|
|
91
|
+
import '../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
92
|
+
import '../../../views/MfaChooseDeviceView/getMfaOptions/getMfaOptions.js';
|
|
93
|
+
import '../../../context/PasskeyContext/PasskeyContext.js';
|
|
94
|
+
import '../../../store/state/sendBalances.js';
|
|
95
|
+
import '../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
96
|
+
import '../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
97
|
+
import '../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
98
|
+
import '../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
99
|
+
import '../../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.js';
|
|
100
|
+
import '../../../../index.js';
|
|
101
|
+
import '../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
102
|
+
import '../../../store/state/tokenBalances.js';
|
|
103
|
+
import '../../../store/state/multichainBalances.js';
|
|
104
|
+
import '../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
105
|
+
import { useInternalDynamicContext } from '../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
|
|
106
|
+
|
|
107
|
+
const usePayWithDynamic = () => {
|
|
108
|
+
const connectUnifiedForFunding = useConnectUnifiedForFunding();
|
|
109
|
+
const projectSettings = useProjectSettings();
|
|
110
|
+
const { linkSocialAccount, signInWithSocialAccount } = useSocialAccounts();
|
|
111
|
+
const user = useOnboardingCompleteUser();
|
|
112
|
+
const { openOnramp, setEnabledOnrampProvidersTargetValue } = useOnrampContext();
|
|
113
|
+
const promptWallet = usePromptAmountAndFundWithWallet();
|
|
114
|
+
const promptExchange = usePromptAmountAndFundWithExchange();
|
|
115
|
+
const { handleWalletItemClick } = useWalletItemActions();
|
|
116
|
+
const { walletConnectorOptions } = getWalletOptions();
|
|
117
|
+
const { setShowAuthFlow, setShowDynamicUserProfile } = useInternalDynamicContext();
|
|
118
|
+
// Flow for funding via wallet
|
|
119
|
+
const handleWalletFlow = useCallback(({ wallet, props, onBack }) => {
|
|
120
|
+
// If user is not onboarded, trigger wallet connector UI
|
|
121
|
+
if (!user) {
|
|
122
|
+
const option = walletConnectorOptions.find(({ key }) => key === wallet.connector.key);
|
|
123
|
+
if (option)
|
|
124
|
+
handleWalletItemClick(option);
|
|
125
|
+
}
|
|
126
|
+
// Prompt for amount and execute wallet funding (shows deposit screen)
|
|
127
|
+
promptWallet({
|
|
128
|
+
amount: { rule: 'exact', value: props.tokenAmount },
|
|
129
|
+
destinationAddress: props.destinationAddress,
|
|
130
|
+
network: props.network,
|
|
131
|
+
onBack,
|
|
132
|
+
token: { rule: 'exact-with-amount', value: props.tokenSymbol },
|
|
133
|
+
wallet: wallet,
|
|
134
|
+
});
|
|
135
|
+
setShowAuthFlow(false);
|
|
136
|
+
}, [
|
|
137
|
+
handleWalletItemClick,
|
|
138
|
+
promptWallet,
|
|
139
|
+
setShowAuthFlow,
|
|
140
|
+
user,
|
|
141
|
+
walletConnectorOptions,
|
|
142
|
+
]);
|
|
143
|
+
// Flow for linking or signing in with social account before exchange
|
|
144
|
+
const handleSocialConnect = useCallback((_a) => __awaiter(void 0, [_a], void 0, function* ({ provider, exchange, props, isSocialProviderAlreadyVerified, }) {
|
|
145
|
+
// if connected social return since already signed in
|
|
146
|
+
if (isSocialProviderAlreadyVerified) {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
const payload = {
|
|
150
|
+
payingWithDynamic: {
|
|
151
|
+
chainName: props.chainName,
|
|
152
|
+
destinationAddress: props.destinationAddress,
|
|
153
|
+
network: props.network,
|
|
154
|
+
tokenAmount: props.tokenAmount,
|
|
155
|
+
tokenSymbol: props.tokenSymbol,
|
|
156
|
+
},
|
|
157
|
+
triggerFundFromExchangeOnSuccess: exchange,
|
|
158
|
+
};
|
|
159
|
+
if (user) {
|
|
160
|
+
// link if user exists
|
|
161
|
+
yield linkSocialAccount(provider, payload);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
// sign in if no user
|
|
165
|
+
yield signInWithSocialAccount(provider, payload);
|
|
166
|
+
}
|
|
167
|
+
return true;
|
|
168
|
+
}), [linkSocialAccount, signInWithSocialAccount, user]);
|
|
169
|
+
// exchange flow
|
|
170
|
+
const handleExchangeFlow = useCallback((_b) => __awaiter(void 0, [_b], void 0, function* ({ exchange, props, onBack }) {
|
|
171
|
+
var _c, _d, _e, _f, _g;
|
|
172
|
+
const fullExchange = (_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.exchanges) === null || _c === void 0 ? void 0 : _c.find((e) => e.exchange === exchange);
|
|
173
|
+
// Social provider for this exchange, if any
|
|
174
|
+
const provider = fullExchange === null || fullExchange === void 0 ? void 0 : fullExchange.socialProvider;
|
|
175
|
+
const isProviderSocialConnectEnabled = provider &&
|
|
176
|
+
Boolean((_e = (_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers) === null || _d === void 0 ? void 0 : _d.find((p) => p.provider === provider)) === null || _e === void 0 ? void 0 : _e.enabledAt);
|
|
177
|
+
// Check if user already verified this social provider
|
|
178
|
+
const isSocialProviderAlreadyVerified = (_g = (_f = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _f === void 0 ? void 0 : _f.some((c) => c.oauthProvider === provider)) !== null && _g !== void 0 ? _g : false;
|
|
179
|
+
// If exchange requires social connect, handle that first
|
|
180
|
+
if (isProviderSocialConnectEnabled && provider) {
|
|
181
|
+
const handled = yield handleSocialConnect({
|
|
182
|
+
exchange,
|
|
183
|
+
isSocialProviderAlreadyVerified,
|
|
184
|
+
props,
|
|
185
|
+
provider,
|
|
186
|
+
});
|
|
187
|
+
// Social connect flow opened, stop here
|
|
188
|
+
if (handled)
|
|
189
|
+
return;
|
|
190
|
+
// If already connected, prompt amount and fund with exchange
|
|
191
|
+
promptExchange({
|
|
192
|
+
exchange,
|
|
193
|
+
onBack,
|
|
194
|
+
payingWithDynamic: props,
|
|
195
|
+
});
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
// No social provider = use on-ramp provider if configured
|
|
199
|
+
if (fullExchange === null || fullExchange === void 0 ? void 0 : fullExchange.onRampProvider) {
|
|
200
|
+
yield openOnramp({
|
|
201
|
+
address: props.destinationAddress,
|
|
202
|
+
chainName: props.chainName,
|
|
203
|
+
network: String(props.network),
|
|
204
|
+
onrampProvider: fullExchange.onRampProvider,
|
|
205
|
+
overrideOnRamp: true,
|
|
206
|
+
payingWithDynamic: true,
|
|
207
|
+
token: props.tokenSymbol,
|
|
208
|
+
tokenAmount: props.tokenAmount,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}), [
|
|
212
|
+
projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.exchanges,
|
|
213
|
+
projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers,
|
|
214
|
+
user === null || user === void 0 ? void 0 : user.verifiedCredentials,
|
|
215
|
+
handleSocialConnect,
|
|
216
|
+
promptExchange,
|
|
217
|
+
openOnramp,
|
|
218
|
+
]);
|
|
219
|
+
const payWithDynamic = useCallback((props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
220
|
+
try {
|
|
221
|
+
setEnabledOnrampProvidersTargetValue({
|
|
222
|
+
address: props.destinationAddress,
|
|
223
|
+
chainName: props.chainName,
|
|
224
|
+
network: String(props.network),
|
|
225
|
+
token: props.tokenSymbol,
|
|
226
|
+
tokenAmount: props.tokenAmount,
|
|
227
|
+
});
|
|
228
|
+
const result = yield connectUnifiedForFunding({
|
|
229
|
+
initiatedByWidget: false,
|
|
230
|
+
});
|
|
231
|
+
if (result.kind === 'wallet') {
|
|
232
|
+
handleWalletFlow({
|
|
233
|
+
onBack: () => {
|
|
234
|
+
setShowAuthFlow(true);
|
|
235
|
+
setShowDynamicUserProfile(false);
|
|
236
|
+
payWithDynamic(props);
|
|
237
|
+
},
|
|
238
|
+
props,
|
|
239
|
+
wallet: result.wallet,
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
else if (result.kind === 'exchange') {
|
|
243
|
+
yield handleExchangeFlow({
|
|
244
|
+
exchange: result.exchange,
|
|
245
|
+
onBack: () => {
|
|
246
|
+
setShowAuthFlow(true);
|
|
247
|
+
setShowDynamicUserProfile(false);
|
|
248
|
+
payWithDynamic(props);
|
|
249
|
+
},
|
|
250
|
+
props,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
yield openOnramp({
|
|
255
|
+
address: props.destinationAddress,
|
|
256
|
+
chainName: props.chainName,
|
|
257
|
+
network: String(props.network),
|
|
258
|
+
onrampProvider: result.onramp.id,
|
|
259
|
+
payingWithDynamic: true,
|
|
260
|
+
token: props.tokenSymbol,
|
|
261
|
+
tokenAmount: props.tokenAmount,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
catch (error) {
|
|
266
|
+
logger.error('usePayWithDynamic failed', error);
|
|
267
|
+
}
|
|
268
|
+
}), [
|
|
269
|
+
setEnabledOnrampProvidersTargetValue,
|
|
270
|
+
connectUnifiedForFunding,
|
|
271
|
+
handleWalletFlow,
|
|
272
|
+
setShowAuthFlow,
|
|
273
|
+
setShowDynamicUserProfile,
|
|
274
|
+
handleExchangeFlow,
|
|
275
|
+
openOnramp,
|
|
276
|
+
]);
|
|
277
|
+
return payWithDynamic;
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
export { usePayWithDynamic };
|
|
@@ -131,6 +131,7 @@ const useWalletOptions = () => {
|
|
|
131
131
|
isInstalledOnBrowser: option.isInstalledOnBrowser,
|
|
132
132
|
isWalletConnect: option.walletConnector.isWalletConnect,
|
|
133
133
|
key: option.walletConnector.key,
|
|
134
|
+
metadata: option.walletConnector.metadata,
|
|
134
135
|
name: option.name,
|
|
135
136
|
};
|
|
136
137
|
});
|
|
@@ -8,6 +8,7 @@ export declare const useWalletOptions: () => {
|
|
|
8
8
|
isInstalledOnBrowser: boolean;
|
|
9
9
|
isWalletConnect: boolean;
|
|
10
10
|
key: string;
|
|
11
|
+
metadata: import("@dynamic-labs/wallet-connector-core").WalletMetadata;
|
|
11
12
|
name: string;
|
|
12
13
|
}[];
|
|
13
14
|
selectWalletOption: (walletKey: string, selectGroupIfAvailable?: boolean) => Promise<Wallet<import("@dynamic-labs/wallet-connector-core").WalletConnectorCore.WalletConnector>>;
|
|
@@ -18,6 +19,7 @@ export declare const useWalletOptions: () => {
|
|
|
18
19
|
isInstalledOnBrowser: boolean;
|
|
19
20
|
isWalletConnect: boolean;
|
|
20
21
|
key: string;
|
|
22
|
+
metadata: import("@dynamic-labs/wallet-connector-core").WalletMetadata;
|
|
21
23
|
name: string;
|
|
22
24
|
}[];
|
|
23
25
|
};
|
|
@@ -127,6 +127,7 @@ const useWalletOptions = () => {
|
|
|
127
127
|
isInstalledOnBrowser: option.isInstalledOnBrowser,
|
|
128
128
|
isWalletConnect: option.walletConnector.isWalletConnect,
|
|
129
129
|
key: option.walletConnector.key,
|
|
130
|
+
metadata: option.walletConnector.metadata,
|
|
130
131
|
name: option.name,
|
|
131
132
|
};
|
|
132
133
|
});
|
|
@@ -65,6 +65,8 @@ require('../../../store/state/tokenBalances.cjs');
|
|
|
65
65
|
require('../../../store/state/multichainBalances.cjs');
|
|
66
66
|
require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
67
67
|
require('../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
68
|
+
require('../../../context/OnrampContext/OnrampContext.cjs');
|
|
69
|
+
require('../../../../index.cjs');
|
|
68
70
|
require('react-dom');
|
|
69
71
|
require('../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
70
72
|
require('../../../components/IconButton/IconButton.cjs');
|
|
@@ -93,13 +95,11 @@ require('../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
|
93
95
|
require('../../../context/FooterAnimationContext/index.cjs');
|
|
94
96
|
require('../../../views/MfaChooseDeviceView/getMfaOptions/getMfaOptions.cjs');
|
|
95
97
|
require('../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
96
|
-
require('../../../context/OnrampContext/OnrampContext.cjs');
|
|
97
98
|
require('../../../store/state/sendBalances.cjs');
|
|
98
99
|
require('../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
99
100
|
require('../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
100
101
|
require('../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
101
102
|
require('../../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.cjs');
|
|
102
|
-
require('../../../../index.cjs');
|
|
103
103
|
require('../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
104
104
|
var SignMessageConfirmationModal = require('../../../modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs');
|
|
105
105
|
var SyncWalletPromptModal = require('../../../modals/SyncWalletPromptModal/SyncWalletPromptModal.cjs');
|
|
@@ -61,6 +61,8 @@ import '../../../store/state/tokenBalances.js';
|
|
|
61
61
|
import '../../../store/state/multichainBalances.js';
|
|
62
62
|
import '../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
63
63
|
import '../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
64
|
+
import '../../../context/OnrampContext/OnrampContext.js';
|
|
65
|
+
import '../../../../index.js';
|
|
64
66
|
import 'react-dom';
|
|
65
67
|
import '../../../components/ShadowDOM/ShadowDOM.js';
|
|
66
68
|
import '../../../components/IconButton/IconButton.js';
|
|
@@ -89,13 +91,11 @@ import '../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
|
89
91
|
import '../../../context/FooterAnimationContext/index.js';
|
|
90
92
|
import '../../../views/MfaChooseDeviceView/getMfaOptions/getMfaOptions.js';
|
|
91
93
|
import '../../../context/PasskeyContext/PasskeyContext.js';
|
|
92
|
-
import '../../../context/OnrampContext/OnrampContext.js';
|
|
93
94
|
import '../../../store/state/sendBalances.js';
|
|
94
95
|
import '../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
95
96
|
import '../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
96
97
|
import '../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
97
98
|
import '../../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.js';
|
|
98
|
-
import '../../../../index.js';
|
|
99
99
|
import '../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
100
100
|
import { SignMessageConfirmationModal } from '../../../modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js';
|
|
101
101
|
import { SyncWalletPromptModal } from '../../../modals/SyncWalletPromptModal/SyncWalletPromptModal.js';
|