@dynamic-labs/sdk-react-core 1.4.2 → 1.4.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 +8 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/index.cjs +13 -13
- package/src/index.d.ts +289 -9
- package/src/lib/context/DynamicContext/DynamicContext.cjs +20 -22
- package/src/lib/context/DynamicContext/DynamicContext.js +22 -24
- package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.cjs +1 -4
- package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.d.ts +1 -7
- package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.js +1 -4
- package/src/lib/context/DynamicContext/helpers/helpers.cjs +2 -2
- package/src/lib/context/DynamicContext/helpers/helpers.d.ts +2 -2
- package/src/lib/context/DynamicContext/helpers/helpers.js +2 -2
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/types.d.ts +1 -2
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +1 -2
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +1 -2
- package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.js +1 -1
- package/src/lib/context/DynamicContext/types/index.d.ts +5 -2
- package/src/lib/context/LoadingContext/LoadingContext.cjs +1 -0
- package/src/lib/context/LoadingContext/LoadingContext.js +1 -0
- package/src/lib/data/api.cjs +3 -0
- package/src/lib/data/api.js +4 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -1
- package/src/lib/utils/constants/localStorage.cjs +2 -2
- package/src/lib/utils/constants/localStorage.d.ts +1 -1
- package/src/lib/utils/constants/localStorage.js +2 -2
- package/src/lib/utils/hooks/index.d.ts +1 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +4 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +4 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +2 -6
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +2 -3
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +2 -6
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +4 -5
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +4 -5
- package/src/lib/utils/hooks/useNetworkNotSupported/index.d.ts +1 -0
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.cjs +104 -0
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.d.ts +3 -0
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.js +100 -0
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.cjs +5 -0
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.js +6 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +9 -31
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +10 -32
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +8 -31
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +8 -31
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
|
|
2
|
+
### [1.4.3](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.2...v1.4.3) (2024-03-28)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* improved email verification error handling ([1aeec7b](https://github.com/dynamic-labs/DynamicAuth/commit/1aeec7bc5e5771e1b518cbde53e691fb837333e5))
|
|
8
|
+
* improved embedded wallet ux ([eaae1b5](https://github.com/dynamic-labs/DynamicAuth/commit/eaae1b5262dbb0d9a1a5ae7852a2cc64e0d07c4a))
|
|
9
|
+
|
|
2
10
|
### [1.4.2](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.1...v1.4.2) (2024-03-26)
|
|
3
11
|
|
|
4
12
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
"react-focus-lock": "2.9.2",
|
|
17
17
|
"react-i18next": "^13.2.0",
|
|
18
18
|
"yup": "0.32.11",
|
|
19
|
-
"@dynamic-labs/ethereum": "1.4.
|
|
20
|
-
"@dynamic-labs/iconic": "1.4.
|
|
21
|
-
"@dynamic-labs/logger": "1.4.
|
|
22
|
-
"@dynamic-labs/multi-wallet": "1.4.
|
|
23
|
-
"@dynamic-labs/rpc-providers": "1.4.
|
|
24
|
-
"@dynamic-labs/types": "1.4.
|
|
25
|
-
"@dynamic-labs/utils": "1.4.
|
|
26
|
-
"@dynamic-labs/viem-utils": "1.4.
|
|
27
|
-
"@dynamic-labs/wallet-book": "1.4.
|
|
28
|
-
"@dynamic-labs/wallet-connector-core": "1.4.
|
|
19
|
+
"@dynamic-labs/ethereum": "1.4.3",
|
|
20
|
+
"@dynamic-labs/iconic": "1.4.3",
|
|
21
|
+
"@dynamic-labs/logger": "1.4.3",
|
|
22
|
+
"@dynamic-labs/multi-wallet": "1.4.3",
|
|
23
|
+
"@dynamic-labs/rpc-providers": "1.4.3",
|
|
24
|
+
"@dynamic-labs/types": "1.4.3",
|
|
25
|
+
"@dynamic-labs/utils": "1.4.3",
|
|
26
|
+
"@dynamic-labs/viem-utils": "1.4.3",
|
|
27
|
+
"@dynamic-labs/wallet-book": "1.4.3",
|
|
28
|
+
"@dynamic-labs/wallet-connector-core": "1.4.3",
|
|
29
29
|
"eventemitter3": "5.0.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
package/src/index.cjs
CHANGED
|
@@ -21,7 +21,7 @@ var validateType = require('./lib/shared/utils/functions/validateType/validateTy
|
|
|
21
21
|
var getChainIcon = require('./lib/shared/utils/functions/chain/getChainIcon.cjs');
|
|
22
22
|
var getChainDisplayName = require('./lib/shared/utils/functions/chain/getChainDisplayName.cjs');
|
|
23
23
|
var createWallet = require('./lib/shared/utils/functions/wallet/createWallet.cjs');
|
|
24
|
-
var index = require('./lib/shared/utils/functions/getValueByKey/index.cjs');
|
|
24
|
+
var index$1 = require('./lib/shared/utils/functions/getValueByKey/index.cjs');
|
|
25
25
|
var detectBrowser = require('./lib/shared/utils/functions/detectBrowser/detectBrowser.cjs');
|
|
26
26
|
var shortenWalletAddress = require('./lib/shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
27
27
|
var debounce = require('./lib/shared/utils/functions/debounce/debounce.cjs');
|
|
@@ -38,7 +38,7 @@ var useForwardedRef = require('./lib/shared/utils/hooks/useForwardedRef/useForwa
|
|
|
38
38
|
var useGlobalLoading = require('./lib/shared/utils/hooks/useGlobalLoading/useGlobalLoading.cjs');
|
|
39
39
|
var useLocalStorage = require('./lib/shared/utils/hooks/useLocalStorage/useLocalStorage.cjs');
|
|
40
40
|
var useMediaQuery = require('./lib/shared/utils/hooks/useMediaQuery/useMediaQuery.cjs');
|
|
41
|
-
var index$
|
|
41
|
+
var index$2 = require('./lib/shared/utils/hooks/useOnClickOutside/index.cjs');
|
|
42
42
|
var usePreventPageScroll = require('./lib/shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs');
|
|
43
43
|
var useThrottle = require('./lib/shared/utils/hooks/useThrottle/useThrottle.cjs');
|
|
44
44
|
var localStorage = require('./lib/shared/utils/classes/storage/localStorage.cjs');
|
|
@@ -115,7 +115,7 @@ var domain = require('./lib/shared/assets/domain.cjs');
|
|
|
115
115
|
var gear = require('./lib/shared/assets/gear.cjs');
|
|
116
116
|
var multipleAccountSecurity = require('./lib/shared/assets/multiple-account-security.cjs');
|
|
117
117
|
var passkeyAccountSecurity = require('./lib/shared/assets/passkey-account-security.cjs');
|
|
118
|
-
var index
|
|
118
|
+
var index = require('./lib/shared/consts/index.cjs');
|
|
119
119
|
var logger = require('./lib/shared/logger.cjs');
|
|
120
120
|
require('../_virtual/_tslib.cjs');
|
|
121
121
|
require('react-dom');
|
|
@@ -228,7 +228,7 @@ exports.validateType = validateType.validateType;
|
|
|
228
228
|
exports.getChainIcon = getChainIcon.getChainIcon;
|
|
229
229
|
exports.getChainDisplayName = getChainDisplayName.getChainDisplayName;
|
|
230
230
|
exports.createWallet = createWallet.createWallet;
|
|
231
|
-
exports.getValueByKey = index.getValueByKey;
|
|
231
|
+
exports.getValueByKey = index$1.getValueByKey;
|
|
232
232
|
exports.detectBrowserName = detectBrowser.detectBrowserName;
|
|
233
233
|
exports.shortenWalletAddress = shortenWalletAddress.shortenWalletAddress;
|
|
234
234
|
exports.debounce = debounce.debounce;
|
|
@@ -245,7 +245,7 @@ exports.useForwardedRef = useForwardedRef.useForwardedRef;
|
|
|
245
245
|
exports.useGlobalLoading = useGlobalLoading.useGlobalLoading;
|
|
246
246
|
exports.useLocalStorage = useLocalStorage.useLocalStorage;
|
|
247
247
|
exports.useMediaQuery = useMediaQuery.useMediaQuery;
|
|
248
|
-
exports.useOnClickOutside = index$
|
|
248
|
+
exports.useOnClickOutside = index$2.useOnClickOutside;
|
|
249
249
|
exports.usePreventPageScroll = usePreventPageScroll.usePreventPageScroll;
|
|
250
250
|
exports.useThrottle = useThrottle.useThrottle;
|
|
251
251
|
exports.LocalStorage = localStorage.LocalStorage;
|
|
@@ -322,14 +322,14 @@ exports.DomainIcon = domain.ReactComponent;
|
|
|
322
322
|
exports.GearIcon = gear.ReactComponent;
|
|
323
323
|
exports.AccountSecurityIcon = multipleAccountSecurity.ReactComponent;
|
|
324
324
|
exports.PasskeyAccountSecurityIcon = passkeyAccountSecurity.ReactComponent;
|
|
325
|
-
exports.authModalZIndex = index
|
|
326
|
-
exports.countryCodes = index
|
|
327
|
-
exports.defaultWalletsForChains = index
|
|
328
|
-
exports.tShirtSizes = index
|
|
329
|
-
exports.teamNames = index
|
|
330
|
-
exports.toolkitZIndex = index
|
|
331
|
-
exports.tooltipZIndex = index
|
|
332
|
-
exports.widgetModalZIndex = index
|
|
325
|
+
exports.authModalZIndex = index.authModalZIndex;
|
|
326
|
+
exports.countryCodes = index.countryCodes;
|
|
327
|
+
exports.defaultWalletsForChains = index.defaultWalletsForChains;
|
|
328
|
+
exports.tShirtSizes = index.tShirtSizes;
|
|
329
|
+
exports.teamNames = index.teamNames;
|
|
330
|
+
exports.toolkitZIndex = index.toolkitZIndex;
|
|
331
|
+
exports.tooltipZIndex = index.tooltipZIndex;
|
|
332
|
+
exports.widgetModalZIndex = index.widgetModalZIndex;
|
|
333
333
|
exports.logger = logger.logger;
|
|
334
334
|
Object.defineProperty(exports, 'DynamicJwtFromJSON', {
|
|
335
335
|
enumerable: true,
|
package/src/index.d.ts
CHANGED
|
@@ -8,23 +8,303 @@ export { useDynamicContext } from './lib/context/DynamicContext/useDynamicContex
|
|
|
8
8
|
export { useDynamicScopes } from './lib/utils/hooks/useDynamicScopes';
|
|
9
9
|
export { useUserWallets } from './lib/context/UserWalletsContext';
|
|
10
10
|
export { DynamicConnectButton, ShadowDOM, IsBrowser } from './lib/components';
|
|
11
|
-
export
|
|
11
|
+
export { DynamicBridgeWidget, DynamicEmbeddedAuthFlow, DynamicEmbeddedUserProfile, DynamicEmbeddedWidget, DynamicMultiWalletPromptsWidget, DynamicNav, DynamicUserProfile, DynamicWidget, FundingWidget, } from './lib/widgets';
|
|
12
12
|
export type { ThemeData } from './lib/context/ThemeContext/types';
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
export {
|
|
14
|
+
/** @deprecated */
|
|
15
|
+
AccountSecurityIcon,
|
|
16
|
+
/** @deprecated */
|
|
17
|
+
AddIcon,
|
|
18
|
+
/** @deprecated */
|
|
19
|
+
AddWalletIcon,
|
|
20
|
+
/** @deprecated */
|
|
21
|
+
AltEmbeddedWalletIcon,
|
|
22
|
+
/** @deprecated */
|
|
23
|
+
AltKeyIcon,
|
|
24
|
+
/** @deprecated */
|
|
25
|
+
AndroidFaceId,
|
|
26
|
+
/** @deprecated */
|
|
27
|
+
AndroidTouchId,
|
|
28
|
+
/** @deprecated */
|
|
29
|
+
ArrowDownIcon,
|
|
30
|
+
/** @deprecated */
|
|
31
|
+
ArrowIcon,
|
|
32
|
+
/** @deprecated */
|
|
33
|
+
ArrowLeftIcon,
|
|
34
|
+
/** @deprecated */
|
|
35
|
+
ArrowRightBackgroundIcon,
|
|
36
|
+
/** @deprecated */
|
|
37
|
+
ArrowRightIcon,
|
|
38
|
+
/** @deprecated */
|
|
39
|
+
AtIcon,
|
|
40
|
+
/** @deprecated */
|
|
41
|
+
authModalZIndex,
|
|
42
|
+
/** @deprecated */
|
|
43
|
+
ceil,
|
|
44
|
+
/** @deprecated */
|
|
45
|
+
CheckCircleIcon,
|
|
46
|
+
/** @deprecated */
|
|
47
|
+
CheckConnectionIcon,
|
|
48
|
+
/** @deprecated */
|
|
49
|
+
CheckIcon,
|
|
50
|
+
/** @deprecated */
|
|
51
|
+
ChevronLeftIcon,
|
|
52
|
+
/** @deprecated */
|
|
53
|
+
CircleLockerIcon,
|
|
54
|
+
/** @deprecated */
|
|
55
|
+
CloseIcon,
|
|
56
|
+
/** @deprecated */
|
|
57
|
+
CopyIcon,
|
|
58
|
+
/** @deprecated */
|
|
59
|
+
countryCodes,
|
|
60
|
+
/** @deprecated */
|
|
61
|
+
createWallet,
|
|
62
|
+
/** @deprecated */
|
|
63
|
+
debounce,
|
|
64
|
+
/** @deprecated */
|
|
65
|
+
decodeJwt,
|
|
66
|
+
/** @deprecated */
|
|
67
|
+
defaultWalletsForChains,
|
|
68
|
+
/** @deprecated */
|
|
69
|
+
detectBrowserName,
|
|
70
|
+
/** @deprecated */
|
|
71
|
+
DomainIcon,
|
|
72
|
+
/** @deprecated */
|
|
73
|
+
DotsHorizontalIcon,
|
|
74
|
+
/** @deprecated */
|
|
75
|
+
DoubleArrowRightIcon, DynamicLogoIcon,
|
|
76
|
+
/** @deprecated */
|
|
77
|
+
EmbeddedWalletIcon,
|
|
78
|
+
/** @deprecated */
|
|
79
|
+
ErrorIcon,
|
|
80
|
+
/** @deprecated */
|
|
81
|
+
ExportEmbeddedHero,
|
|
82
|
+
/** @deprecated */
|
|
83
|
+
ExportPrivateKeyIcon,
|
|
84
|
+
/** @deprecated */
|
|
85
|
+
ExportRecoveryPhraseIcon,
|
|
86
|
+
/** @deprecated */
|
|
87
|
+
ExternalLinkIcon,
|
|
88
|
+
/** @deprecated */
|
|
89
|
+
EyeIcon,
|
|
90
|
+
/** @deprecated */
|
|
91
|
+
EyeOffIcon,
|
|
92
|
+
/** @deprecated */
|
|
93
|
+
FaceIdIcon,
|
|
94
|
+
/** @deprecated */
|
|
95
|
+
formatBigNumber,
|
|
96
|
+
/** @deprecated */
|
|
97
|
+
GasIcon,
|
|
98
|
+
/** @deprecated */
|
|
99
|
+
GearIcon,
|
|
100
|
+
/** @deprecated */
|
|
101
|
+
getChainDisplayName,
|
|
102
|
+
/** @deprecated */
|
|
103
|
+
getChainIcon,
|
|
104
|
+
/** @deprecated */
|
|
105
|
+
getValueByKey,
|
|
106
|
+
/** @deprecated */
|
|
107
|
+
getWalletListItemLabel,
|
|
108
|
+
/** @deprecated */
|
|
109
|
+
InfoIcon,
|
|
110
|
+
/** @deprecated */
|
|
111
|
+
IPhoneFaceId,
|
|
112
|
+
/** @deprecated */
|
|
113
|
+
IPhoneTouchId,
|
|
114
|
+
/** @deprecated */
|
|
115
|
+
isDisplayOrderPriorityForWeb2,
|
|
116
|
+
/** @deprecated */
|
|
117
|
+
isDisplayOrderPriorityForWeb3,
|
|
118
|
+
/** @deprecated */
|
|
119
|
+
isSSR,
|
|
120
|
+
/** @deprecated */
|
|
121
|
+
JustifiedTextIcon,
|
|
122
|
+
/** @deprecated */
|
|
123
|
+
KeyIcon,
|
|
124
|
+
/** @deprecated */
|
|
125
|
+
KeyOutlineIcon,
|
|
126
|
+
/** @deprecated */
|
|
127
|
+
LinkIcon,
|
|
128
|
+
/** @deprecated */
|
|
129
|
+
LocalStorage,
|
|
130
|
+
/** @deprecated */
|
|
131
|
+
LocationIcon,
|
|
132
|
+
/** @deprecated */
|
|
133
|
+
LockIcon,
|
|
134
|
+
/** @deprecated */
|
|
135
|
+
logger,
|
|
136
|
+
/** @deprecated */
|
|
137
|
+
LogoutIcon,
|
|
138
|
+
/** @deprecated */
|
|
139
|
+
MailIcon,
|
|
140
|
+
/** @deprecated */
|
|
141
|
+
PasskeyAccountSecurityIcon,
|
|
142
|
+
/** @deprecated */
|
|
143
|
+
PasskeyIntroIcon,
|
|
144
|
+
/** @deprecated */
|
|
145
|
+
PasskeySuccessIcon,
|
|
146
|
+
/** @deprecated */
|
|
147
|
+
PencilAltIcon,
|
|
148
|
+
/** @deprecated */
|
|
149
|
+
PencilIcon,
|
|
150
|
+
/** @deprecated */
|
|
151
|
+
PhantomLedgerIcon,
|
|
152
|
+
/** @deprecated */
|
|
153
|
+
PhoneIcon,
|
|
154
|
+
/** @deprecated */
|
|
155
|
+
PromptAccountSwitch,
|
|
156
|
+
/** @deprecated */
|
|
157
|
+
providerLabel,
|
|
158
|
+
/** @deprecated */
|
|
159
|
+
PuzzleIcon,
|
|
160
|
+
/** @deprecated */
|
|
161
|
+
QuestionMarkIcon,
|
|
162
|
+
/** @deprecated */
|
|
163
|
+
SendIcon,
|
|
164
|
+
/** @deprecated */
|
|
165
|
+
shortenWalletAddress,
|
|
166
|
+
/** @deprecated */
|
|
167
|
+
SignCircleIcon,
|
|
168
|
+
/** @deprecated */
|
|
169
|
+
SignInWithEmailIcon,
|
|
170
|
+
/** @deprecated */
|
|
171
|
+
SizeLabelsIcon,
|
|
172
|
+
/** @deprecated */
|
|
173
|
+
SparklesIcon,
|
|
174
|
+
/** @deprecated */
|
|
175
|
+
SpinnerIcon,
|
|
176
|
+
/** @deprecated */
|
|
177
|
+
SwitchHorizontalIcon,
|
|
178
|
+
/** @deprecated */
|
|
179
|
+
teamNames,
|
|
180
|
+
/** @deprecated */
|
|
181
|
+
ThreeDots,
|
|
182
|
+
/** @deprecated */
|
|
183
|
+
toolkitZIndex,
|
|
184
|
+
/** @deprecated */
|
|
185
|
+
TooltipArrow,
|
|
186
|
+
/** @deprecated */
|
|
187
|
+
tooltipZIndex,
|
|
188
|
+
/** @deprecated */
|
|
189
|
+
trimEnd,
|
|
190
|
+
/** @deprecated */
|
|
191
|
+
tShirtSizes, type AccessDeniedCustomButton, type AccountSwitchState, type AuthModeType, type AwaitingSignatureState,
|
|
192
|
+
/** @deprecated */
|
|
193
|
+
type BrowserName, type ChainNamesUnion, type ChainToWalletMap,
|
|
194
|
+
/** @deprecated */
|
|
195
|
+
type CopyKey, type DynamicEventsCallbacks, type DynamicRPCProviders,
|
|
196
|
+
/** @deprecated */
|
|
197
|
+
type EmbeddedWalletCurrentAction,
|
|
198
|
+
/** @deprecated */
|
|
199
|
+
type EmbeddedWalletSessionSettings,
|
|
200
|
+
/** @deprecated */
|
|
201
|
+
type ErrorWithCode, type IAdditionalInformation,
|
|
202
|
+
/** @deprecated */
|
|
203
|
+
type Icon,
|
|
204
|
+
/** @deprecated */
|
|
205
|
+
type LocalStorageNetworks,
|
|
206
|
+
/** @deprecated */
|
|
207
|
+
type LocalStorageNonce,
|
|
208
|
+
/** @deprecated */
|
|
209
|
+
type LocalStorageSettings,
|
|
210
|
+
/** @deprecated */
|
|
211
|
+
type ModalProps, type MultiWalletWidgetState, type OnAuthSuccess, type OnBeforeConnectSuccessConfirmation, type onConnect, type OnDisconnect, type OnEmailVerificationFailure, type OnEmailVerificationSuccess, type OnEmbeddedWalletCreated, type OnLinkSuccess, type OnUserProfileUpdate, type ProjectSettingsProps, type UserProfile,
|
|
212
|
+
/** @deprecated */
|
|
213
|
+
type VerifyCallbackArgs, type VerifyProps,
|
|
214
|
+
/** @deprecated */
|
|
215
|
+
type VerifyWallet, type VerifyWalletProps, type Wallet,
|
|
216
|
+
/** @deprecated */
|
|
217
|
+
type WalletAction,
|
|
218
|
+
/** @deprecated */
|
|
219
|
+
type WalletGroupOption, type WalletNamesUnion, type WalletOption,
|
|
220
|
+
/** @deprecated */
|
|
221
|
+
type WalletProvider,
|
|
222
|
+
/** @deprecated */
|
|
223
|
+
type WalletWithAction,
|
|
224
|
+
/** @deprecated */
|
|
225
|
+
UnlinkIcon,
|
|
226
|
+
/** @deprecated */
|
|
227
|
+
useEffectOnce,
|
|
228
|
+
/** @deprecated */
|
|
229
|
+
useForwardedRef,
|
|
230
|
+
/** @deprecated */
|
|
231
|
+
useGlobalLoading,
|
|
232
|
+
/** @deprecated */
|
|
233
|
+
useLocalStorage,
|
|
234
|
+
/** @deprecated */
|
|
235
|
+
useMediaQuery,
|
|
236
|
+
/** @deprecated */
|
|
237
|
+
useOnClickOutside,
|
|
238
|
+
/** @deprecated */
|
|
239
|
+
usePreventPageScroll,
|
|
240
|
+
/** @deprecated */
|
|
241
|
+
UserCardIcon,
|
|
242
|
+
/** @deprecated */
|
|
243
|
+
UserCleanIcon,
|
|
244
|
+
/** @deprecated */
|
|
245
|
+
UserIcon,
|
|
246
|
+
/** @deprecated */
|
|
247
|
+
useThrottle,
|
|
248
|
+
/** @deprecated */
|
|
249
|
+
validateType,
|
|
250
|
+
/** @deprecated */
|
|
251
|
+
WalletConnectLogo,
|
|
252
|
+
/** @deprecated */
|
|
253
|
+
WalletOutlineIcon,
|
|
254
|
+
/** @deprecated */
|
|
255
|
+
WalletV2Icon,
|
|
256
|
+
/** @deprecated */
|
|
257
|
+
widgetModalZIndex,
|
|
258
|
+
/** @deprecated */
|
|
259
|
+
WorkSuitcaseIcon, } from './lib/shared';
|
|
260
|
+
export {
|
|
261
|
+
/** @deprecated */
|
|
262
|
+
CollectUserDataView,
|
|
263
|
+
/** @deprecated */
|
|
264
|
+
EmailConfirmationWaitingView,
|
|
265
|
+
/** @deprecated */
|
|
266
|
+
FarcasterConnectView,
|
|
267
|
+
/** @deprecated */
|
|
268
|
+
NetworkNotSupportedSwitchManual,
|
|
269
|
+
/** @deprecated */
|
|
270
|
+
NoAccess,
|
|
271
|
+
/** @deprecated */
|
|
272
|
+
NoQrNotInstalledView,
|
|
273
|
+
/** @deprecated */
|
|
274
|
+
PendingSignatureView,
|
|
275
|
+
/** @deprecated */
|
|
276
|
+
QrCodeView,
|
|
277
|
+
/** @deprecated */
|
|
278
|
+
viewToComponentMap,
|
|
279
|
+
/** @deprecated */
|
|
280
|
+
WalletList, } from './lib/views';
|
|
281
|
+
export {
|
|
282
|
+
/** @deprecated */
|
|
283
|
+
MockContext,
|
|
284
|
+
/** @deprecated */
|
|
285
|
+
MockContextProvider,
|
|
286
|
+
/** @deprecated */
|
|
287
|
+
MockContextWrapper,
|
|
288
|
+
/** @deprecated */
|
|
289
|
+
useMockContext, } from './lib/context/MockContext';
|
|
290
|
+
export { getDefaultColor, getThemeConfig, themesData, } from './lib/context/ThemeContext/themesData';
|
|
291
|
+
export type {
|
|
292
|
+
/** @deprecated */
|
|
293
|
+
ViewType, } from './lib/context/ViewContext';
|
|
18
294
|
export type { NotSupportedError, NoAccessError, ChainalysisError, EmailAlreadyExistsError, UsernameAlreadyExistsError, SocialAccountAlreadyExistsError, WalletNotDeployedError, WalletUsedError, EmailVerificationError, AccountExistsError, } from '@dynamic-labs/utils';
|
|
19
295
|
export type { WalletConnector, Chain, } from '@dynamic-labs/wallet-connector-core';
|
|
20
296
|
export type { EvmNetwork } from '@dynamic-labs/types';
|
|
21
297
|
export { normalizeWalletName } from '@dynamic-labs/wallet-connector-core';
|
|
22
298
|
export { isSameWalletName } from './lib/utils/functions/isSameWalletName';
|
|
23
|
-
export {
|
|
299
|
+
export {
|
|
300
|
+
/** @deprecated use https://www.npmjs.com/package/classnames */
|
|
301
|
+
classNames, } from './lib/utils/functions/classNames';
|
|
24
302
|
export { getNetwork } from './lib/utils/functions/getNetwork';
|
|
25
303
|
export { createWalletClientFromWallet } from './lib/utils/functions/createWalletClientFromWallet';
|
|
26
|
-
export
|
|
27
|
-
export {
|
|
304
|
+
export { FilterAndSortWallets, FilterBridgeChainsName, FilterChain, FilterWallets, RemoveWallets, SortWallets, UniswapFilter, } from './lib/utils/functions/walletFilters';
|
|
305
|
+
export {
|
|
306
|
+
/** @deprecated */
|
|
307
|
+
DynamicWidgetContextProvider, } from './lib/widgets/DynamicWidget/context';
|
|
28
308
|
export { useWalletItemActions, useAuthenticateConnectedUser, useSocialAccounts, useEmbeddedWallet, useEmbeddedWalletAuthenticator, usePasskeyRecovery, useEmbeddedReveal, useIsLoggedIn, } from './lib/utils/hooks';
|
|
29
309
|
export { useUserUpdateRequest, useWalletConnectorEvent, } from './lib/utils/hooks';
|
|
30
310
|
export { type VerifyEmailCallback, useEmailVerificationRequest, } from './lib/utils/hooks/authenticationHooks/';
|
|
@@ -151,8 +151,8 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
151
151
|
const [onboardingOnlyJwt, setOnboardingOnlyJwt] = React.useState(undefined);
|
|
152
152
|
// state to track the full connectivity status of the individual's wallets.
|
|
153
153
|
// Set to true once the predetermined number of wallets is connected.
|
|
154
|
-
const [
|
|
155
|
-
const [
|
|
154
|
+
const [bridgeOnboardingCompleted, setBridgeOnboardingCompleted, removeBridgeOnboardingCompleted,] = useLocalStorage.useLocalStorage(localStorage$1.BRIDGE_ONBOARDING_COMPLETED, false);
|
|
155
|
+
const [isFullyConnected, setIsFullyConnected] = React.useState(false);
|
|
156
156
|
// Allows clients to control widget flow without need to click on AccountControl
|
|
157
157
|
const [showDynamicUserProfile, setShowDynamicUserProfile] = React.useState(false);
|
|
158
158
|
// Alows clients to control the Bridget Widget flow without need to click on Bridge Widget
|
|
@@ -229,25 +229,18 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
229
229
|
environmentId,
|
|
230
230
|
isBridgeFlow,
|
|
231
231
|
onBeforeConnectSuccessConfirmation: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onBeforeConnectSuccessConfirmation,
|
|
232
|
-
onDisconnect: (
|
|
233
|
-
bridgeChains,
|
|
234
|
-
connectedWalletsInfo,
|
|
232
|
+
onDisconnect: (wallet) => handleDisconnectWallet.handleDisconnectWallet({
|
|
235
233
|
eventsCallbacks,
|
|
236
|
-
setBridgeChainsToConnect,
|
|
237
234
|
wallet,
|
|
238
235
|
}),
|
|
239
236
|
primaryWalletId,
|
|
240
|
-
removeIsFullyConnected,
|
|
241
237
|
setIsVerificationInProgress,
|
|
242
238
|
setPrimaryWalletId,
|
|
243
239
|
setShowAuthFlow,
|
|
244
240
|
user,
|
|
245
241
|
walletConnectorOptions,
|
|
246
242
|
});
|
|
247
|
-
React.
|
|
248
|
-
const missingChains = getMissingChains.getMissingChains(bridgeChains, connectedWalletsInfo);
|
|
249
|
-
setBridgeChainsToConnect(missingChains);
|
|
250
|
-
}, [bridgeChains]);
|
|
243
|
+
const bridgeChainsToConnect = React.useMemo(() => getMissingChains.getMissingChains(bridgeChains, connectedWalletsInfo), [bridgeChains, connectedWalletsInfo]);
|
|
251
244
|
const { selectedWalletConnector, setSelectedWalletConnectorKey } = useSelectedWalletConnector.useSelectedWalletConnector({ walletConnectorOptions });
|
|
252
245
|
//selected wallet to perform an action (become primary, unlink, etc)
|
|
253
246
|
const [selectedWalletWithAction, setSelectedWalletWithAction] = React.useState(null);
|
|
@@ -269,6 +262,9 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
269
262
|
user,
|
|
270
263
|
walletConnectorOptions,
|
|
271
264
|
});
|
|
265
|
+
React.useEffect(() => {
|
|
266
|
+
setIsFullyConnected(!(bridgeChainsToConnect === null || bridgeChainsToConnect === void 0 ? void 0 : bridgeChainsToConnect.length) && Boolean(primaryWallet));
|
|
267
|
+
}, [bridgeChainsToConnect, primaryWallet]);
|
|
272
268
|
const walletConnectors = linkedOrConnectedWallets.map((wallet) => wallet.connector);
|
|
273
269
|
const { sdkHasLoaded, setSdkHasLoaded } = useGlobalLoading.useGlobalLoading({
|
|
274
270
|
authMode,
|
|
@@ -301,14 +297,13 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
301
297
|
handleRemoveLsNetworks,
|
|
302
298
|
initialAuthenticationMode,
|
|
303
299
|
isVerificationInProgress,
|
|
300
|
+
removeBridgeOnboardingCompleted,
|
|
304
301
|
removeConnectedNameService,
|
|
305
302
|
removeConnectedWalletsInfo,
|
|
306
|
-
removeIsFullyConnected,
|
|
307
303
|
removeLsSettings,
|
|
308
304
|
removeUser,
|
|
309
305
|
resetLoginWithEmail,
|
|
310
306
|
setAuthMode,
|
|
311
|
-
setBridgeChainsToConnect,
|
|
312
307
|
setIsVerificationInProgress,
|
|
313
308
|
setLegacyIsVerifying,
|
|
314
309
|
setMultiWalletWidgetState,
|
|
@@ -450,6 +445,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
450
445
|
awaitingSignatureState,
|
|
451
446
|
bridgeChains,
|
|
452
447
|
bridgeChainsToConnect,
|
|
448
|
+
bridgeOnboardingCompleted,
|
|
453
449
|
clearStatesOnBackClick,
|
|
454
450
|
connectWallet,
|
|
455
451
|
connectedWallets,
|
|
@@ -503,6 +499,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
503
499
|
privacyPolicyUrl,
|
|
504
500
|
projectSettings,
|
|
505
501
|
qrcodeUri,
|
|
502
|
+
removeBridgeOnboardingCompleted,
|
|
506
503
|
removeConnectedWalletsInfo,
|
|
507
504
|
rpcProviders,
|
|
508
505
|
sdkHasLoaded,
|
|
@@ -512,10 +509,9 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
512
509
|
sendWagmiSettings,
|
|
513
510
|
setAuthMode,
|
|
514
511
|
setAuthorizationViewDisplayOrder,
|
|
515
|
-
|
|
512
|
+
setBridgeOnboardingCompleted,
|
|
516
513
|
setCallback,
|
|
517
514
|
setDesktopUri,
|
|
518
|
-
setIsFullyConnected,
|
|
519
515
|
setIsSingleWalletAccount,
|
|
520
516
|
setIsVerificationInProgress,
|
|
521
517
|
setLegacyIsVerifying,
|
|
@@ -572,6 +568,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
572
568
|
awaitingSignatureState,
|
|
573
569
|
bridgeChains,
|
|
574
570
|
bridgeChainsToConnect,
|
|
571
|
+
bridgeOnboardingCompleted,
|
|
575
572
|
clearStatesOnBackClick,
|
|
576
573
|
connectWallet,
|
|
577
574
|
connectedWallets,
|
|
@@ -579,13 +576,13 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
579
576
|
cssOverrides,
|
|
580
577
|
customPrivacyPolicy,
|
|
581
578
|
customTermsOfServices,
|
|
582
|
-
enableConnectOnlyFallback,
|
|
583
579
|
debugError,
|
|
584
580
|
onboardingOnlyJwt,
|
|
585
581
|
defaultNumberOfWalletsToShow,
|
|
586
582
|
desktopUri,
|
|
587
583
|
disconnectWallet,
|
|
588
584
|
displaySiweStatement,
|
|
585
|
+
enableConnectOnlyFallback,
|
|
589
586
|
environmentId,
|
|
590
587
|
eventsCallbacks,
|
|
591
588
|
getConnectedWalletById,
|
|
@@ -601,7 +598,6 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
601
598
|
isVerificationInProgress,
|
|
602
599
|
legacyIsVerifying,
|
|
603
600
|
user,
|
|
604
|
-
networkValidationMode,
|
|
605
601
|
linkedOrConnectedWallets,
|
|
606
602
|
loadingNetwork,
|
|
607
603
|
loginWithEmail,
|
|
@@ -609,17 +605,21 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
609
605
|
multiWalletWidgetState,
|
|
610
606
|
network,
|
|
611
607
|
serverNetworkConfigurations,
|
|
608
|
+
networkValidationMode,
|
|
612
609
|
walletsForChainsMap,
|
|
613
610
|
imageUserNotInAccessList,
|
|
614
611
|
notInTheListImageUrl,
|
|
615
612
|
imageUserInAccessList,
|
|
616
613
|
onboardingImageUrl,
|
|
614
|
+
settings.overrides,
|
|
615
|
+
passkeySuccessPopup,
|
|
617
616
|
policiesConsentInnerComponent,
|
|
618
617
|
primaryWallet,
|
|
619
618
|
primaryWalletId,
|
|
620
619
|
privacyPolicyUrl,
|
|
621
620
|
projectSettings,
|
|
622
621
|
qrcodeUri,
|
|
622
|
+
removeBridgeOnboardingCompleted,
|
|
623
623
|
removeConnectedWalletsInfo,
|
|
624
624
|
rpcProviders,
|
|
625
625
|
sdkHasLoaded,
|
|
@@ -629,8 +629,8 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
629
629
|
sendWagmiSettings,
|
|
630
630
|
setAuthMode,
|
|
631
631
|
setAuthorizationViewDisplayOrder,
|
|
632
|
+
setBridgeOnboardingCompleted,
|
|
632
633
|
setCallback,
|
|
633
|
-
setIsFullyConnected,
|
|
634
634
|
setIsVerificationInProgress,
|
|
635
635
|
setLogInWithEmail,
|
|
636
636
|
setMultiWallet,
|
|
@@ -650,7 +650,6 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
650
650
|
showBridgeWidget,
|
|
651
651
|
showDynamicUserProfile,
|
|
652
652
|
showLockedWalletView,
|
|
653
|
-
passkeySuccessPopup,
|
|
654
653
|
showQrcodeModal,
|
|
655
654
|
showWidgetStatePopup,
|
|
656
655
|
signWithEmailWalletName,
|
|
@@ -665,7 +664,6 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
665
664
|
walletConnectorOptions,
|
|
666
665
|
walletUiUtils,
|
|
667
666
|
walletsFilter,
|
|
668
|
-
settings.overrides,
|
|
669
667
|
]);
|
|
670
668
|
React.useEffect(() => {
|
|
671
669
|
const addPrefetch = (attr) => {
|
|
@@ -704,10 +702,10 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
704
702
|
}
|
|
705
703
|
}, [multiWallet, multiWalletWidgetState, showDynamicUserProfile, user]);
|
|
706
704
|
return (jsxRuntime.jsx(reactI18next.I18nextProvider, { i18n: i18nSDKInstance, children: jsxRuntime.jsx(DynamicContext.Provider, { value: value, children: jsxRuntime.jsx(walletBook.WalletBookContextProvider, { walletBook: walletBook$1, children: jsxRuntime.jsx(ThemeContext.ThemeContextProvider, { customerTheme: parseTheme.parseTheme(theme, ((_f = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _f === void 0 ? void 0 : _f.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsxRuntime.jsx(LoadingContext.LoadingContextProvider, { children: jsxRuntime.jsxs(ViewContext.ViewContextProvider, { initialView: helpers.getInitialView({
|
|
705
|
+
bridgeOnboardingCompleted,
|
|
707
706
|
connectedWallets,
|
|
708
|
-
isAuthenticated,
|
|
707
|
+
isAuthenticated: isAuthenticated || Boolean(primaryWallet),
|
|
709
708
|
isBridgeFlow,
|
|
710
|
-
isFullyConnected,
|
|
711
709
|
isMultiWalletEnabled: multiWallet,
|
|
712
710
|
}), children: [networkValidationMode === 'always' && jsxRuntime.jsx(UseNetworkValidation.UseNetworkValidation, {}), jsxRuntime.jsx(CaptchaContext.CaptchaContextProvider, { children: jsxRuntime.jsx(AccountExistsContext.AccountExistsContextProvider, { children: jsxRuntime.jsx(WalletContext.WalletContextProvider, { canSync: didConnectedStateLoad, children: jsxRuntime.jsx(PasskeyContext.PasskeyContextProvider, { children: jsxRuntime.jsx(EmailVerificationContext.EmailVerificationContextProvider, { children: jsxRuntime.jsx(DynamicWidgetContext.DynamicWidgetContextProvider, { children: jsxRuntime.jsx(DynamicBridgeWidgetContext.DynamicBridgeWidgetContextProvider, { children: jsxRuntime.jsx(FundingContext.FundingContextProvider, { children: jsxRuntime.jsx(AccessDeniedContext.AccessDeniedContextProvider, { children: jsxRuntime.jsx(SendBalanceContext.SendBalanceContextProvider, { children: jsxRuntime.jsx(WalletGroupContext.WalletGroupContextProvider, { children: jsxRuntime.jsx(UserFieldEditorContext.UserFieldEditorContextProvider, { children: jsxRuntime.jsx(ConnectWithEmailOtpProvider.ConnectWithEmailOtpProvider, { children: jsxRuntime.jsx(PhantomRedirectContext.PhantomRedirectContextProvider, { children: jsxRuntime.jsxs(SocialRedirectContext.SocialRedirectContextProvider, { children: [jsxRuntime.jsx(app.DynamicAuthFlow, {}), jsxRuntime.jsx(Toolkit.Toolkit, {}), jsxRuntime.jsx(FundingWidget.FundingWidget, {}), jsxRuntime.jsx(SyncPasskeyFlow.SyncPasskeyFlow, {}), confirmationModal, children] }) }) }) }) }) }) }) }) }) }) }) }) }) }) })] }) }) }) }) }) }));
|
|
713
711
|
};
|