@dynamic-labs/ethereum-aa 4.29.0 → 4.29.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 +22 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +10 -10
- package/src/ZeroDevConnector.cjs +18 -6
- package/src/ZeroDevConnector.d.ts +1 -0
- package/src/ZeroDevConnector.js +18 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.29.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.29.1...v4.29.2) (2025-08-25)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* return wallet metadata in walletOption ([#9391](https://github.com/dynamic-labs/dynamic-auth/issues/9391)) ([4ddd7ea](https://github.com/dynamic-labs/dynamic-auth/commit/4ddd7eadc37d646ab5d39fab420e598e47f5741b))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* export usePayWithDynamic ([#9395](https://github.com/dynamic-labs/dynamic-auth/issues/9395)) ([059999e](https://github.com/dynamic-labs/dynamic-auth/commit/059999e3b156510ce95c6bf413c0a0123a52b251))
|
|
13
|
+
|
|
14
|
+
### [4.29.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.29.0...v4.29.1) (2025-08-21)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* clear user op cache on send transaction ([#9382](https://github.com/dynamic-labs/dynamic-auth/issues/9382)) ([ddef1e1](https://github.com/dynamic-labs/dynamic-auth/commit/ddef1e16367e04d217e6d79a138988394605dda6))
|
|
20
|
+
* display error when trying to register a previously registered passkey ([#9381](https://github.com/dynamic-labs/dynamic-auth/issues/9381)) ([51ecdd8](https://github.com/dynamic-labs/dynamic-auth/commit/51ecdd84a3d1a36435cc79063caa2fd7187a25db))
|
|
21
|
+
* do not double disable confirmation ui ([#9385](https://github.com/dynamic-labs/dynamic-auth/issues/9385)) ([2deb3ae](https://github.com/dynamic-labs/dynamic-auth/commit/2deb3aeb3055ceb79ea2e8410cce94448b18f8c5))
|
|
22
|
+
* **react-native:** dont emit network change events for disabled chains ([#9375](https://github.com/dynamic-labs/dynamic-auth/issues/9375)) ([f03151e](https://github.com/dynamic-labs/dynamic-auth/commit/f03151ea6b065f6b297edb053fbf84f1060b35e4))
|
|
23
|
+
|
|
2
24
|
## [4.29.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.28.0...v4.29.0) (2025-08-19)
|
|
3
25
|
|
|
4
26
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum-aa",
|
|
3
|
-
"version": "4.29.
|
|
3
|
+
"version": "4.29.2",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
21
|
+
"@dynamic-labs/sdk-api-core": "0.0.758",
|
|
22
22
|
"@zerodev/ecdsa-validator": "5.4.9",
|
|
23
23
|
"@zerodev/multi-chain-ecdsa-validator": "5.4.5",
|
|
24
24
|
"@zerodev/sdk": "5.4.36",
|
|
25
|
-
"@dynamic-labs/assert-package-version": "4.29.
|
|
26
|
-
"@dynamic-labs/ethereum-aa-core": "4.29.
|
|
27
|
-
"@dynamic-labs/ethereum-core": "4.29.
|
|
28
|
-
"@dynamic-labs/logger": "4.29.
|
|
29
|
-
"@dynamic-labs/types": "4.29.
|
|
30
|
-
"@dynamic-labs/utils": "4.29.
|
|
31
|
-
"@dynamic-labs/wallet-book": "4.29.
|
|
32
|
-
"@dynamic-labs/wallet-connector-core": "4.29.
|
|
25
|
+
"@dynamic-labs/assert-package-version": "4.29.2",
|
|
26
|
+
"@dynamic-labs/ethereum-aa-core": "4.29.2",
|
|
27
|
+
"@dynamic-labs/ethereum-core": "4.29.2",
|
|
28
|
+
"@dynamic-labs/logger": "4.29.2",
|
|
29
|
+
"@dynamic-labs/types": "4.29.2",
|
|
30
|
+
"@dynamic-labs/utils": "4.29.2",
|
|
31
|
+
"@dynamic-labs/wallet-book": "4.29.2",
|
|
32
|
+
"@dynamic-labs/wallet-connector-core": "4.29.2"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"viem": "^2.28.4"
|
package/src/ZeroDevConnector.cjs
CHANGED
|
@@ -54,6 +54,8 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
|
54
54
|
* Flag for EIP-7702 mode, enabled when EIP-7702 is enabled and no smart account exists
|
|
55
55
|
*/
|
|
56
56
|
this.shouldUseEIP7702Mode = false;
|
|
57
|
+
// Avoid double-disabling confirmation UI when sendUserOperation is invoked within onSendTransaction
|
|
58
|
+
this.isInOnSendTransactionFlow = false;
|
|
57
59
|
this._walletUiUtils = opts.walletUiUtils;
|
|
58
60
|
this.providersConfig = (_a = opts.providersConfig) !== null && _a !== void 0 ? _a : {};
|
|
59
61
|
this.is7702EnabledOnDashboard =
|
|
@@ -315,7 +317,9 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
|
315
317
|
kernelClient = yield createEcdsaKernelAccountClient.createEcdsaKernelAccountClient(Object.assign(Object.assign({}, params), { ecdsaValidator: getEcdsaValidator.getEcdsaValidator(this.ecdsaProviderType) }));
|
|
316
318
|
}
|
|
317
319
|
utils.wrapMethodWithCallback(kernelClient, 'sendUserOperation', (original, ...args) => {
|
|
318
|
-
this.
|
|
320
|
+
if (!this.isInOnSendTransactionFlow) {
|
|
321
|
+
this._walletUiUtils.disabledConfirmationOnce();
|
|
322
|
+
}
|
|
319
323
|
return original(...args);
|
|
320
324
|
});
|
|
321
325
|
return kernelClient;
|
|
@@ -420,8 +424,8 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
|
420
424
|
return this.internalSignMessage(message);
|
|
421
425
|
}),
|
|
422
426
|
onSendTransaction: (_b) => _tslib.__awaiter(this, [_b], void 0, function* ({ transaction }) {
|
|
427
|
+
this.isInOnSendTransactionFlow = true;
|
|
423
428
|
try {
|
|
424
|
-
this._walletUiUtils.disabledConfirmationOnce();
|
|
425
429
|
const effectiveProvider = this.isGasSponsorshipDisabled()
|
|
426
430
|
? provider
|
|
427
431
|
: this.kernelClientWithSponsorship;
|
|
@@ -432,17 +436,22 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
|
432
436
|
const key = `${unformattedTransaction.from}-${unformattedTransaction.to}-${unformattedTransaction.data}`;
|
|
433
437
|
const cachedTransaction = this.userOperationCache[key];
|
|
434
438
|
const isWaasEOAConnector = this.eoaConnector && walletConnectorCore.isDynamicWaasConnector(this.eoaConnector);
|
|
439
|
+
let response;
|
|
435
440
|
if (isWaasEOAConnector) {
|
|
436
441
|
const userOperation = (cachedTransaction === null || cachedTransaction === void 0 ? void 0 : cachedTransaction.userOperation) ||
|
|
437
442
|
(yield this.getCurrentUserOperation(unformattedTransaction))
|
|
438
443
|
.userOperation;
|
|
439
|
-
|
|
444
|
+
response = yield this.signAndSendUserOperationWithWaas(effectiveProvider, userOperation);
|
|
440
445
|
}
|
|
441
|
-
if (cachedTransaction) {
|
|
446
|
+
else if (cachedTransaction) {
|
|
447
|
+
this._walletUiUtils.disabledConfirmationOnce();
|
|
442
448
|
const signedTransaction = yield effectiveProvider.signUserOperation(cachedTransaction.userOperation);
|
|
443
|
-
|
|
449
|
+
response = yield effectiveProvider.sendUserOperation(signedTransaction);
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
response = yield effectiveProvider.sendTransaction(unformattedTransaction);
|
|
444
453
|
}
|
|
445
|
-
|
|
454
|
+
this.userOperationCache = {};
|
|
446
455
|
return response;
|
|
447
456
|
}
|
|
448
457
|
catch (err) {
|
|
@@ -455,6 +464,9 @@ class ZeroDevConnector extends ethereumAaCore.AccountAbstractionBaseConnector {
|
|
|
455
464
|
}
|
|
456
465
|
throw err;
|
|
457
466
|
}
|
|
467
|
+
finally {
|
|
468
|
+
this.isInOnSendTransactionFlow = false;
|
|
469
|
+
}
|
|
458
470
|
}),
|
|
459
471
|
onSignTypedData: (_c) => _tslib.__awaiter(this, [_c], void 0, function* ({ message }) {
|
|
460
472
|
this._walletUiUtils.disabledConfirmationOnce();
|
|
@@ -75,6 +75,7 @@ export declare class ZeroDevConnector extends AccountAbstractionBaseConnector im
|
|
|
75
75
|
* Flag for EIP-7702 mode, enabled when EIP-7702 is enabled and no smart account exists
|
|
76
76
|
*/
|
|
77
77
|
private shouldUseEIP7702Mode;
|
|
78
|
+
private isInOnSendTransactionFlow;
|
|
78
79
|
constructor(opts: ZeroDevConnectorProps);
|
|
79
80
|
confirmTransactionStatus(): Promise<TransactionReceipt>;
|
|
80
81
|
get currentNetworkProvider(): {
|
package/src/ZeroDevConnector.js
CHANGED
|
@@ -50,6 +50,8 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
|
50
50
|
* Flag for EIP-7702 mode, enabled when EIP-7702 is enabled and no smart account exists
|
|
51
51
|
*/
|
|
52
52
|
this.shouldUseEIP7702Mode = false;
|
|
53
|
+
// Avoid double-disabling confirmation UI when sendUserOperation is invoked within onSendTransaction
|
|
54
|
+
this.isInOnSendTransactionFlow = false;
|
|
53
55
|
this._walletUiUtils = opts.walletUiUtils;
|
|
54
56
|
this.providersConfig = (_a = opts.providersConfig) !== null && _a !== void 0 ? _a : {};
|
|
55
57
|
this.is7702EnabledOnDashboard =
|
|
@@ -311,7 +313,9 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
|
311
313
|
kernelClient = yield createEcdsaKernelAccountClient(Object.assign(Object.assign({}, params), { ecdsaValidator: getEcdsaValidator(this.ecdsaProviderType) }));
|
|
312
314
|
}
|
|
313
315
|
wrapMethodWithCallback(kernelClient, 'sendUserOperation', (original, ...args) => {
|
|
314
|
-
this.
|
|
316
|
+
if (!this.isInOnSendTransactionFlow) {
|
|
317
|
+
this._walletUiUtils.disabledConfirmationOnce();
|
|
318
|
+
}
|
|
315
319
|
return original(...args);
|
|
316
320
|
});
|
|
317
321
|
return kernelClient;
|
|
@@ -416,8 +420,8 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
|
416
420
|
return this.internalSignMessage(message);
|
|
417
421
|
}),
|
|
418
422
|
onSendTransaction: (_b) => __awaiter(this, [_b], void 0, function* ({ transaction }) {
|
|
423
|
+
this.isInOnSendTransactionFlow = true;
|
|
419
424
|
try {
|
|
420
|
-
this._walletUiUtils.disabledConfirmationOnce();
|
|
421
425
|
const effectiveProvider = this.isGasSponsorshipDisabled()
|
|
422
426
|
? provider
|
|
423
427
|
: this.kernelClientWithSponsorship;
|
|
@@ -428,17 +432,22 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
|
428
432
|
const key = `${unformattedTransaction.from}-${unformattedTransaction.to}-${unformattedTransaction.data}`;
|
|
429
433
|
const cachedTransaction = this.userOperationCache[key];
|
|
430
434
|
const isWaasEOAConnector = this.eoaConnector && isDynamicWaasConnector(this.eoaConnector);
|
|
435
|
+
let response;
|
|
431
436
|
if (isWaasEOAConnector) {
|
|
432
437
|
const userOperation = (cachedTransaction === null || cachedTransaction === void 0 ? void 0 : cachedTransaction.userOperation) ||
|
|
433
438
|
(yield this.getCurrentUserOperation(unformattedTransaction))
|
|
434
439
|
.userOperation;
|
|
435
|
-
|
|
440
|
+
response = yield this.signAndSendUserOperationWithWaas(effectiveProvider, userOperation);
|
|
436
441
|
}
|
|
437
|
-
if (cachedTransaction) {
|
|
442
|
+
else if (cachedTransaction) {
|
|
443
|
+
this._walletUiUtils.disabledConfirmationOnce();
|
|
438
444
|
const signedTransaction = yield effectiveProvider.signUserOperation(cachedTransaction.userOperation);
|
|
439
|
-
|
|
445
|
+
response = yield effectiveProvider.sendUserOperation(signedTransaction);
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
response = yield effectiveProvider.sendTransaction(unformattedTransaction);
|
|
440
449
|
}
|
|
441
|
-
|
|
450
|
+
this.userOperationCache = {};
|
|
442
451
|
return response;
|
|
443
452
|
}
|
|
444
453
|
catch (err) {
|
|
@@ -451,6 +460,9 @@ class ZeroDevConnector extends AccountAbstractionBaseConnector {
|
|
|
451
460
|
}
|
|
452
461
|
throw err;
|
|
453
462
|
}
|
|
463
|
+
finally {
|
|
464
|
+
this.isInOnSendTransactionFlow = false;
|
|
465
|
+
}
|
|
454
466
|
}),
|
|
455
467
|
onSignTypedData: (_c) => __awaiter(this, [_c], void 0, function* ({ message }) {
|
|
456
468
|
this._walletUiUtils.disabledConfirmationOnce();
|