@dynamic-labs/sdk-react-core 4.87.1 → 4.87.2
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 +2 -2
- package/package.js +2 -2
- package/package.json +13 -13
- package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.cjs +19 -0
- package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.js +19 -0
- package/src/lib/utils/hooks/useWalletBackup/types.d.ts +12 -0
- package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.cjs +2 -1
- package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.87.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.87.1...v4.87.2) (2026-06-03)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* allow for using v2 zerodev projects ([#11449](https://github.com/dynamic-labs/dynamic-auth/issues/11449)) ([9242698](https://github.com/dynamic-labs/dynamic-auth/commit/9242698670db92b03ad1afc776e674ec9a7e7e54))
|
|
8
|
+
* e2e: ensure MFA item is detached before logout ([#11452](https://github.com/dynamic-labs/dynamic-auth/issues/11452)) ([5a4c67e](https://github.com/dynamic-labs/dynamic-auth/commit/5a4c67e93b66a548346c1065fb373c675f0054a0))
|
|
9
|
+
|
|
2
10
|
### [4.87.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.87.0...v4.87.1) (2026-06-03)
|
|
3
11
|
|
|
4
12
|
|
package/package.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "4.87.
|
|
6
|
+
var version = "4.87.2";
|
|
7
7
|
var dependencies = {
|
|
8
8
|
"@dynamic-labs/sdk-api-core": "0.0.1015",
|
|
9
|
-
"@dynamic-labs-sdk/client": "1.
|
|
9
|
+
"@dynamic-labs-sdk/client": "1.6.0",
|
|
10
10
|
"@dynamic-labs-wallet/browser-wallet-client": "1.0.13",
|
|
11
11
|
"@dynamic-labs-wallet/forward-mpc-client": "0.10.1",
|
|
12
12
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
package/package.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "4.87.
|
|
2
|
+
var version = "4.87.2";
|
|
3
3
|
var dependencies = {
|
|
4
4
|
"@dynamic-labs/sdk-api-core": "0.0.1015",
|
|
5
|
-
"@dynamic-labs-sdk/client": "1.
|
|
5
|
+
"@dynamic-labs-sdk/client": "1.6.0",
|
|
6
6
|
"@dynamic-labs-wallet/browser-wallet-client": "1.0.13",
|
|
7
7
|
"@dynamic-labs-wallet/forward-mpc-client": "0.10.1",
|
|
8
8
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.87.
|
|
3
|
+
"version": "4.87.2",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@dynamic-labs/sdk-api-core": "0.0.1015",
|
|
6
|
-
"@dynamic-labs-sdk/client": "1.
|
|
6
|
+
"@dynamic-labs-sdk/client": "1.6.0",
|
|
7
7
|
"@dynamic-labs-wallet/browser-wallet-client": "1.0.13",
|
|
8
8
|
"@dynamic-labs-wallet/forward-mpc-client": "0.10.1",
|
|
9
9
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"yup": "0.32.11",
|
|
18
18
|
"react-international-phone": "4.5.0",
|
|
19
19
|
"bs58": "5.0.0",
|
|
20
|
-
"@dynamic-labs/assert-package-version": "4.87.
|
|
21
|
-
"@dynamic-labs/iconic": "4.87.
|
|
22
|
-
"@dynamic-labs/locale": "4.87.
|
|
23
|
-
"@dynamic-labs/logger": "4.87.
|
|
24
|
-
"@dynamic-labs/multi-wallet": "4.87.
|
|
25
|
-
"@dynamic-labs/rpc-providers": "4.87.
|
|
26
|
-
"@dynamic-labs/store": "4.87.
|
|
27
|
-
"@dynamic-labs/types": "4.87.
|
|
28
|
-
"@dynamic-labs/utils": "4.87.
|
|
29
|
-
"@dynamic-labs/wallet-book": "4.87.
|
|
30
|
-
"@dynamic-labs/wallet-connector-core": "4.87.
|
|
20
|
+
"@dynamic-labs/assert-package-version": "4.87.2",
|
|
21
|
+
"@dynamic-labs/iconic": "4.87.2",
|
|
22
|
+
"@dynamic-labs/locale": "4.87.2",
|
|
23
|
+
"@dynamic-labs/logger": "4.87.2",
|
|
24
|
+
"@dynamic-labs/multi-wallet": "4.87.2",
|
|
25
|
+
"@dynamic-labs/rpc-providers": "4.87.2",
|
|
26
|
+
"@dynamic-labs/store": "4.87.2",
|
|
27
|
+
"@dynamic-labs/types": "4.87.2",
|
|
28
|
+
"@dynamic-labs/utils": "4.87.2",
|
|
29
|
+
"@dynamic-labs/wallet-book": "4.87.2",
|
|
30
|
+
"@dynamic-labs/wallet-connector-core": "4.87.2",
|
|
31
31
|
"eventemitter3": "5.0.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
@@ -153,6 +153,7 @@ const useSyncDynamicWaas = () => {
|
|
|
153
153
|
const { mutate: processSettings, isLoading: isProcessingSettings } = useWalletSettingsProcessor();
|
|
154
154
|
const { initDelegationProcess, shouldPromptWalletDelegation } = useWalletDelegation.useWalletDelegation();
|
|
155
155
|
const user = useOnboardingCompleteUser.useOnboardingCompleteUser();
|
|
156
|
+
const environmentId = dynamicContextProps.useEnvironmentId();
|
|
156
157
|
const triggeredCreate = React.useRef(false);
|
|
157
158
|
const triggeredSettingsProcessing = React.useRef(false);
|
|
158
159
|
const hasWaasInitializedRef = React.useRef(false);
|
|
@@ -233,11 +234,22 @@ const useSyncDynamicWaas = () => {
|
|
|
233
234
|
? '[useSyncDynamicWaas] session id changed, initializing waas'
|
|
234
235
|
: '[useSyncDynamicWaas] waas not initialized, initializing waas');
|
|
235
236
|
initializingWaasRef.current = true;
|
|
237
|
+
const initStartedAt = Date.now();
|
|
236
238
|
initializeWaas()
|
|
237
239
|
.then(() => {
|
|
238
240
|
logger.logger.debug('[useSyncDynamicWaas] waas initialized');
|
|
239
241
|
hasWaasInitializedRef.current = true;
|
|
240
242
|
sessionIdRef.current = sessionId;
|
|
243
|
+
// Host-observed time to get the WaaS iframe/client ready. Ships to
|
|
244
|
+
// Datadog (sliced by @version + environmentId) as the host-side
|
|
245
|
+
// companion to the iframe app's `waas_iframe_*` timing — used to
|
|
246
|
+
// quantify the per-page cost the bwc 0.x -> 1.x rewrite introduced.
|
|
247
|
+
logger.logger.instrument('WaaS host init', {
|
|
248
|
+
environmentId,
|
|
249
|
+
key: 'waas_host_init',
|
|
250
|
+
time: Date.now() - initStartedAt,
|
|
251
|
+
userId,
|
|
252
|
+
});
|
|
241
253
|
})
|
|
242
254
|
.catch((error) => {
|
|
243
255
|
logger.logger.warn('[useSyncDynamicWaas] Error initializing waas', {
|
|
@@ -245,6 +257,13 @@ const useSyncDynamicWaas = () => {
|
|
|
245
257
|
sessionId,
|
|
246
258
|
userId,
|
|
247
259
|
});
|
|
260
|
+
logger.logger.instrument('WaaS host init failed', {
|
|
261
|
+
environmentId,
|
|
262
|
+
key: 'waas_host_init_failed',
|
|
263
|
+
reason: error instanceof Error ? error.message : String(error),
|
|
264
|
+
time: Date.now() - initStartedAt,
|
|
265
|
+
userId,
|
|
266
|
+
});
|
|
248
267
|
})
|
|
249
268
|
.finally(() => {
|
|
250
269
|
initializingWaasRef.current = false;
|
|
@@ -149,6 +149,7 @@ const useSyncDynamicWaas = () => {
|
|
|
149
149
|
const { mutate: processSettings, isLoading: isProcessingSettings } = useWalletSettingsProcessor();
|
|
150
150
|
const { initDelegationProcess, shouldPromptWalletDelegation } = useWalletDelegation();
|
|
151
151
|
const user = useOnboardingCompleteUser();
|
|
152
|
+
const environmentId = useEnvironmentId();
|
|
152
153
|
const triggeredCreate = useRef(false);
|
|
153
154
|
const triggeredSettingsProcessing = useRef(false);
|
|
154
155
|
const hasWaasInitializedRef = useRef(false);
|
|
@@ -229,11 +230,22 @@ const useSyncDynamicWaas = () => {
|
|
|
229
230
|
? '[useSyncDynamicWaas] session id changed, initializing waas'
|
|
230
231
|
: '[useSyncDynamicWaas] waas not initialized, initializing waas');
|
|
231
232
|
initializingWaasRef.current = true;
|
|
233
|
+
const initStartedAt = Date.now();
|
|
232
234
|
initializeWaas()
|
|
233
235
|
.then(() => {
|
|
234
236
|
logger.debug('[useSyncDynamicWaas] waas initialized');
|
|
235
237
|
hasWaasInitializedRef.current = true;
|
|
236
238
|
sessionIdRef.current = sessionId;
|
|
239
|
+
// Host-observed time to get the WaaS iframe/client ready. Ships to
|
|
240
|
+
// Datadog (sliced by @version + environmentId) as the host-side
|
|
241
|
+
// companion to the iframe app's `waas_iframe_*` timing — used to
|
|
242
|
+
// quantify the per-page cost the bwc 0.x -> 1.x rewrite introduced.
|
|
243
|
+
logger.instrument('WaaS host init', {
|
|
244
|
+
environmentId,
|
|
245
|
+
key: 'waas_host_init',
|
|
246
|
+
time: Date.now() - initStartedAt,
|
|
247
|
+
userId,
|
|
248
|
+
});
|
|
237
249
|
})
|
|
238
250
|
.catch((error) => {
|
|
239
251
|
logger.warn('[useSyncDynamicWaas] Error initializing waas', {
|
|
@@ -241,6 +253,13 @@ const useSyncDynamicWaas = () => {
|
|
|
241
253
|
sessionId,
|
|
242
254
|
userId,
|
|
243
255
|
});
|
|
256
|
+
logger.instrument('WaaS host init failed', {
|
|
257
|
+
environmentId,
|
|
258
|
+
key: 'waas_host_init_failed',
|
|
259
|
+
reason: error instanceof Error ? error.message : String(error),
|
|
260
|
+
time: Date.now() - initStartedAt,
|
|
261
|
+
userId,
|
|
262
|
+
});
|
|
244
263
|
})
|
|
245
264
|
.finally(() => {
|
|
246
265
|
initializingWaasRef.current = false;
|
|
@@ -15,4 +15,16 @@ export type CloudProviderBackupOptions = {
|
|
|
15
15
|
provider: CloudBackupProvider;
|
|
16
16
|
accountAddress: string;
|
|
17
17
|
password?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional consumer-supplied Google Drive access token. When provided (and
|
|
20
|
+
* already granted Drive scopes), the SDK uses it directly instead of falling
|
|
21
|
+
* back to the stored OAuth token — avoiding a second Google consent prompt.
|
|
22
|
+
*
|
|
23
|
+
* Especially useful for consumers using external auth: the user's Google
|
|
24
|
+
* account isn't linked in Dynamic, so there's no stored OAuth token to fall
|
|
25
|
+
* back on — they obtain a Drive-scoped token themselves and pass it here.
|
|
26
|
+
*
|
|
27
|
+
* Only applies to the GoogleDrive provider.
|
|
28
|
+
*/
|
|
29
|
+
googleDriveAccessToken?: string;
|
|
18
30
|
};
|
|
@@ -292,7 +292,7 @@ const useWalletBackup = (options) => {
|
|
|
292
292
|
return true;
|
|
293
293
|
}, [isGoogleLinked]);
|
|
294
294
|
const backupToCloudProviderCore = React.useCallback((options, walletToBackup) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
295
|
-
const { provider, password } = options;
|
|
295
|
+
const { provider, password, googleDriveAccessToken } = options;
|
|
296
296
|
try {
|
|
297
297
|
const waasConnector = getWaasWalletConnector(walletToBackup.chain);
|
|
298
298
|
if (!waasConnector) {
|
|
@@ -304,6 +304,7 @@ const useWalletBackup = (options) => {
|
|
|
304
304
|
if (provider === types.CloudBackupProvider.GoogleDrive) {
|
|
305
305
|
yield waasConnector.backupKeySharesToGoogleDrive({
|
|
306
306
|
accountAddress: walletToBackup.address,
|
|
307
|
+
googleDriveAccessToken,
|
|
307
308
|
password,
|
|
308
309
|
});
|
|
309
310
|
}
|
|
@@ -288,7 +288,7 @@ const useWalletBackup = (options) => {
|
|
|
288
288
|
return true;
|
|
289
289
|
}, [isGoogleLinked]);
|
|
290
290
|
const backupToCloudProviderCore = useCallback((options, walletToBackup) => __awaiter(void 0, void 0, void 0, function* () {
|
|
291
|
-
const { provider, password } = options;
|
|
291
|
+
const { provider, password, googleDriveAccessToken } = options;
|
|
292
292
|
try {
|
|
293
293
|
const waasConnector = getWaasWalletConnector(walletToBackup.chain);
|
|
294
294
|
if (!waasConnector) {
|
|
@@ -300,6 +300,7 @@ const useWalletBackup = (options) => {
|
|
|
300
300
|
if (provider === CloudBackupProvider.GoogleDrive) {
|
|
301
301
|
yield waasConnector.backupKeySharesToGoogleDrive({
|
|
302
302
|
accountAddress: walletToBackup.address,
|
|
303
|
+
googleDriveAccessToken,
|
|
303
304
|
password,
|
|
304
305
|
});
|
|
305
306
|
}
|