@dynamic-labs/ethereum-aa 1.0.0-alpha.6 → 1.0.0-alpha.7
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
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
|
|
2
|
+
## [1.0.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2023-12-05)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add support for Turnkey HD wallets and backwards compatiblity for private key wallets ([#4011](https://github.com/dynamic-labs/DynamicAuth/issues/4011)) ([75c5258](https://github.com/dynamic-labs/DynamicAuth/commit/75c5258da494d5d4dfa8b96655303dd9645f2269))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* add close button to wallets list ([#4036](https://github.com/dynamic-labs/DynamicAuth/issues/4036)) ([a2b988b](https://github.com/dynamic-labs/DynamicAuth/commit/a2b988bdfc662af6f85d37a79ed6666c483aa447))
|
|
13
|
+
* add support for embedded wallets in connect-only ([#4041](https://github.com/dynamic-labs/DynamicAuth/issues/4041)) ([ceea635](https://github.com/dynamic-labs/DynamicAuth/commit/ceea635b69e2a0c2636b47fbd30639d69dba7a1c))
|
|
14
|
+
* embedded wallet invalid stored chain breaking network picker ([#4050](https://github.com/dynamic-labs/DynamicAuth/issues/4050)) ([2e2384b](https://github.com/dynamic-labs/DynamicAuth/commit/2e2384ba37407d9164cce47e23f5d5f469f7e062))
|
|
15
|
+
* handle insufficient funds from AA provider ([#4027](https://github.com/dynamic-labs/DynamicAuth/issues/4027)) ([6b9cc88](https://github.com/dynamic-labs/DynamicAuth/commit/6b9cc886f4f2590094bd50aba195c07a5532dfa4))
|
|
16
|
+
* prevent double logout caused by wagmi sync ([#4048](https://github.com/dynamic-labs/DynamicAuth/issues/4048)) ([c66c81c](https://github.com/dynamic-labs/DynamicAuth/commit/c66c81c80839aa9ce1cfae76f4afce12e34f3513))
|
|
17
|
+
* properly detect network switch for secondary wallets ([#4038](https://github.com/dynamic-labs/DynamicAuth/issues/4038)) ([f87174d](https://github.com/dynamic-labs/DynamicAuth/commit/f87174de0892dd057401eaf3c0bc68d974add0fc))
|
|
18
|
+
* **use-wallets-connected-state:** update state on wallet id change ([#4045](https://github.com/dynamic-labs/DynamicAuth/issues/4045)) ([ca3a835](https://github.com/dynamic-labs/DynamicAuth/commit/ca3a8359eae386bffa758ed646ac14af8360a7f8))
|
|
19
|
+
* user should be able to see the full passkey name on management view ([#4043](https://github.com/dynamic-labs/DynamicAuth/issues/4043)) ([7bc1b70](https://github.com/dynamic-labs/DynamicAuth/commit/7bc1b7043cbc9f0e21df78a57efc3e6938a99db2))
|
|
20
|
+
* users should be able to easily find passkey recovery ([#4058](https://github.com/dynamic-labs/DynamicAuth/issues/4058)) ([0202ae9](https://github.com/dynamic-labs/DynamicAuth/commit/0202ae98c96544dec5ac357dc77000996e32ad33))
|
|
21
|
+
|
|
2
22
|
## [1.0.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2023-11-29)
|
|
3
23
|
|
|
4
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum-aa",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@zerodev/sdk": "^4.1.5",
|
|
30
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
31
|
-
"@dynamic-labs/logger": "1.0.0-alpha.
|
|
32
|
-
"@dynamic-labs/types": "1.0.0-alpha.
|
|
33
|
-
"@dynamic-labs/utils": "1.0.0-alpha.
|
|
34
|
-
"@dynamic-labs/viem-utils": "1.0.0-alpha.
|
|
35
|
-
"@dynamic-labs/wallet-book": "1.0.0-alpha.
|
|
36
|
-
"@dynamic-labs/wallet-connector-core": "1.0.0-alpha.
|
|
30
|
+
"@dynamic-labs/sdk-api": "0.0.315",
|
|
31
|
+
"@dynamic-labs/logger": "1.0.0-alpha.7",
|
|
32
|
+
"@dynamic-labs/types": "1.0.0-alpha.7",
|
|
33
|
+
"@dynamic-labs/utils": "1.0.0-alpha.7",
|
|
34
|
+
"@dynamic-labs/viem-utils": "1.0.0-alpha.7",
|
|
35
|
+
"@dynamic-labs/wallet-book": "1.0.0-alpha.7",
|
|
36
|
+
"@dynamic-labs/wallet-connector-core": "1.0.0-alpha.7"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"viem": "^1.1.0"
|
package/src/ZeroDevConnector.cjs
CHANGED
|
@@ -9,7 +9,6 @@ var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
|
9
9
|
var viemUtils = require('@dynamic-labs/viem-utils');
|
|
10
10
|
var utils = require('@dynamic-labs/utils');
|
|
11
11
|
var logger = require('./utils/logger.cjs');
|
|
12
|
-
var isGasNotSponsoredError = require('./utils/isGasNotSponsoredError.cjs');
|
|
13
12
|
|
|
14
13
|
class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
15
14
|
get key() {
|
|
@@ -136,9 +135,12 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
136
135
|
}
|
|
137
136
|
catch (err) {
|
|
138
137
|
logger.logger.debug(err);
|
|
139
|
-
if (
|
|
138
|
+
if (utils.TransactionGasCannotBeSponsoredError.isErrorMessage(err)) {
|
|
140
139
|
throw new utils.TransactionGasCannotBeSponsoredError();
|
|
141
140
|
}
|
|
141
|
+
if (utils.InsufficientFundsError.isErrorMessage(err)) {
|
|
142
|
+
throw new utils.InsufficientFundsError();
|
|
143
|
+
}
|
|
142
144
|
throw err;
|
|
143
145
|
}
|
|
144
146
|
}),
|
package/src/ZeroDevConnector.js
CHANGED
|
@@ -3,9 +3,8 @@ import { ECDSAProvider, convertWalletClientToAccountSigner } from '@zerodev/sdk'
|
|
|
3
3
|
import { custom, createWalletClient, isHex, fromHex, formatEther } from 'viem';
|
|
4
4
|
import { WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import { confirmationTransport, unFormatTransaction } from '@dynamic-labs/viem-utils';
|
|
6
|
-
import { parseEvmNetworks, DynamicError, DeferredPromise, wrapMethodWithCallback, TransactionGasCannotBeSponsoredError } from '@dynamic-labs/utils';
|
|
6
|
+
import { parseEvmNetworks, DynamicError, DeferredPromise, wrapMethodWithCallback, TransactionGasCannotBeSponsoredError, InsufficientFundsError } from '@dynamic-labs/utils';
|
|
7
7
|
import { logger } from './utils/logger.js';
|
|
8
|
-
import { isGasNotSponsoredError } from './utils/isGasNotSponsoredError.js';
|
|
9
8
|
|
|
10
9
|
class ZeroDevConnector extends WalletConnectorBase {
|
|
11
10
|
get key() {
|
|
@@ -132,9 +131,12 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
132
131
|
}
|
|
133
132
|
catch (err) {
|
|
134
133
|
logger.debug(err);
|
|
135
|
-
if (
|
|
134
|
+
if (TransactionGasCannotBeSponsoredError.isErrorMessage(err)) {
|
|
136
135
|
throw new TransactionGasCannotBeSponsoredError();
|
|
137
136
|
}
|
|
137
|
+
if (InsufficientFundsError.isErrorMessage(err)) {
|
|
138
|
+
throw new InsufficientFundsError();
|
|
139
|
+
}
|
|
138
140
|
throw err;
|
|
139
141
|
}
|
|
140
142
|
}),
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const isGasNotSponsoredError = (err) => {
|
|
6
|
-
var _a;
|
|
7
|
-
return (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.includes('userOp did not match any gas sponsoring policies');
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
exports.isGasNotSponsoredError = isGasNotSponsoredError;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isGasNotSponsoredError: (err: unknown) => boolean | undefined;
|