@dynamic-labs/ethereum 0.19.0-alpha.0 → 0.19.0-alpha.1
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,35 @@
|
|
|
1
1
|
|
|
2
|
+
## [0.19.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.0...v0.19.0-alpha.1) (2023-08-10)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* cleaning up email input field - delete continue button ([#2833](https://github.com/dynamic-labs/DynamicAuth/issues/2833)) ([baa399e](https://github.com/dynamic-labs/DynamicAuth/commit/baa399e387bce9570a7e7774d68dc3c92f86be1b))
|
|
8
|
+
* disable social buttons after provider is selected ([#2875](https://github.com/dynamic-labs/DynamicAuth/issues/2875)) ([6296ce1](https://github.com/dynamic-labs/DynamicAuth/commit/6296ce13062a8589cf6fb4741957dc9bf84552a2))
|
|
9
|
+
* **GVTY-65:** Allow Merging accounts when duplicated email in KYC step ([#2772](https://github.com/dynamic-labs/DynamicAuth/issues/2772)) ([8efb6ae](https://github.com/dynamic-labs/DynamicAuth/commit/8efb6aecc9445ef1798a5c6358eac27b16f661b6))
|
|
10
|
+
* hide network from nav if hideNetworkInDynamicWidget setting is true ([#2842](https://github.com/dynamic-labs/DynamicAuth/issues/2842)) ([f3dc9ba](https://github.com/dynamic-labs/DynamicAuth/commit/f3dc9ba987781d5d0540336f351bb9f148400eac))
|
|
11
|
+
* show email submit button on focus ([#2860](https://github.com/dynamic-labs/DynamicAuth/issues/2860)) ([87d8ae0](https://github.com/dynamic-labs/DynamicAuth/commit/87d8ae0806425a25835efda5f9b9abc58e5de18e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* account already exist message not displaying automatically ([#2896](https://github.com/dynamic-labs/DynamicAuth/issues/2896)) ([ba56c93](https://github.com/dynamic-labs/DynamicAuth/commit/ba56c936546428b0a1111ab5ef6e8d0d9a463bb5))
|
|
17
|
+
* array of dynamicWagmiSettings not being sent, must be turned into object ([#2835](https://github.com/dynamic-labs/DynamicAuth/issues/2835)) ([092c45a](https://github.com/dynamic-labs/DynamicAuth/commit/092c45afd3676fbd7c3d28f51818470de7f95768))
|
|
18
|
+
* change network modal doesn't pop on secondary wallet, when primaryWallet was disconnected ([#2817](https://github.com/dynamic-labs/DynamicAuth/issues/2817)) ([b68c156](https://github.com/dynamic-labs/DynamicAuth/commit/b68c1565f936d2f4275b104a0881ba5720101abd))
|
|
19
|
+
* connectSuccess callback is not being called when connecting new wallet after unlink ([#2814](https://github.com/dynamic-labs/DynamicAuth/issues/2814)) ([d5b34d8](https://github.com/dynamic-labs/DynamicAuth/commit/d5b34d8a073436ce39280766608578fd97567fac))
|
|
20
|
+
* css variables are being ignored for ConnectButton component ([#2869](https://github.com/dynamic-labs/DynamicAuth/issues/2869)) ([a54fb46](https://github.com/dynamic-labs/DynamicAuth/commit/a54fb46648758001450a33e6d86cf04765507701))
|
|
21
|
+
* css variables for the ConnectButton are being ignored ([#2856](https://github.com/dynamic-labs/DynamicAuth/issues/2856)) ([65a342f](https://github.com/dynamic-labs/DynamicAuth/commit/65a342f828b6a16f714fc6b6e2066e1b742b2c0a))
|
|
22
|
+
* don't let user update email if it's linked to an embedded wallet ([#2883](https://github.com/dynamic-labs/DynamicAuth/issues/2883)) ([99aa303](https://github.com/dynamic-labs/DynamicAuth/commit/99aa3033e62c0dee14657cb811db8d5b3597f7de))
|
|
23
|
+
* **GVTY-150:** blocto pop up to sign after disconnect ([#2854](https://github.com/dynamic-labs/DynamicAuth/issues/2854)) ([df5481b](https://github.com/dynamic-labs/DynamicAuth/commit/df5481b2d5438848ad96cdee402f40b520bead08))
|
|
24
|
+
* **GVTY-155:** update to the new design ([#2889](https://github.com/dynamic-labs/DynamicAuth/issues/2889)) ([31f7f54](https://github.com/dynamic-labs/DynamicAuth/commit/31f7f54444c623fe7d5bcf8a42f94ee22eedc3e1))
|
|
25
|
+
* **GVTY-159:** email update view not showing email used error ([#2887](https://github.com/dynamic-labs/DynamicAuth/issues/2887)) ([bd40e4c](https://github.com/dynamic-labs/DynamicAuth/commit/bd40e4c77cda42752d44e42b98bfcea4cfd77a80))
|
|
26
|
+
* **OTPOverviewView:** enable close only on close button click ([#2877](https://github.com/dynamic-labs/DynamicAuth/issues/2877)) ([2be23e7](https://github.com/dynamic-labs/DynamicAuth/commit/2be23e7ddefe67c971d863ad9069ac5b8a74f4e5))
|
|
27
|
+
* **transaction:** improve gas estimate in transaction confirmation ([#2767](https://github.com/dynamic-labs/DynamicAuth/issues/2767)) ([7180ae5](https://github.com/dynamic-labs/DynamicAuth/commit/7180ae50559f924ae9769b2b8d87eadc6604c754))
|
|
28
|
+
* use findSocialIcon instead getSocialIcon to avoid render errors ([#2834](https://github.com/dynamic-labs/DynamicAuth/issues/2834)) ([2c57f98](https://github.com/dynamic-labs/DynamicAuth/commit/2c57f98fd5c461ae4acbe2836f719ebe18bc21fc))
|
|
29
|
+
* **useWalletConnectorEvent:** ensure connector is initialized ([#2849](https://github.com/dynamic-labs/DynamicAuth/issues/2849)) ([9137131](https://github.com/dynamic-labs/DynamicAuth/commit/913713166af8a6e6cc15a8e362e57b328fc0a76f))
|
|
30
|
+
* **wcv2:** simulate chain change event in switchNetwork ([#2809](https://github.com/dynamic-labs/DynamicAuth/issues/2809)) ([2329b80](https://github.com/dynamic-labs/DynamicAuth/commit/2329b808f57644cebb664be536bc41e256d108d8))
|
|
31
|
+
* wrong wallet list is showing after disconnecting and network change ([#2815](https://github.com/dynamic-labs/DynamicAuth/issues/2815)) ([6cae101](https://github.com/dynamic-labs/DynamicAuth/commit/6cae1019f40be4ffe7ab0426aa159c652a770a82))
|
|
32
|
+
|
|
2
33
|
## [0.19.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-RC.25...v0.19.0-alpha.0) (2023-08-01)
|
|
3
34
|
|
|
4
35
|
## [0.18.0-RC.25](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-RC.24...v0.18.0-RC.25) (2023-08-01)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum",
|
|
3
|
-
"version": "0.19.0-alpha.
|
|
3
|
+
"version": "0.19.0-alpha.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"ethers": "5.7.2",
|
|
33
33
|
"eventemitter3": "5.0.1",
|
|
34
34
|
"buffer": "6.0.3",
|
|
35
|
-
"@dynamic-labs/rpc-providers": "0.19.0-alpha.
|
|
36
|
-
"@dynamic-labs/types": "0.19.0-alpha.
|
|
37
|
-
"@dynamic-labs/utils": "0.19.0-alpha.
|
|
38
|
-
"@dynamic-labs/wallet-book": "0.19.0-alpha.
|
|
39
|
-
"@dynamic-labs/wallet-connector-core": "0.19.0-alpha.
|
|
35
|
+
"@dynamic-labs/rpc-providers": "0.19.0-alpha.1",
|
|
36
|
+
"@dynamic-labs/types": "0.19.0-alpha.1",
|
|
37
|
+
"@dynamic-labs/utils": "0.19.0-alpha.1",
|
|
38
|
+
"@dynamic-labs/wallet-book": "0.19.0-alpha.1",
|
|
39
|
+
"@dynamic-labs/wallet-connector-core": "0.19.0-alpha.1",
|
|
40
40
|
"@ethersproject/providers": "5.7.2"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {}
|
|
@@ -26,7 +26,7 @@ export declare abstract class EthWalletConnector extends WalletConnectorBase {
|
|
|
26
26
|
supportsNetworkSwitching(): boolean;
|
|
27
27
|
switchNetwork({ networkName, networkChainId, }: SwitchNetworkOps): Promise<void>;
|
|
28
28
|
getConnectedAccounts(): Promise<string[]>;
|
|
29
|
-
|
|
29
|
+
providerSwitchNetwork({ network, provider, }: {
|
|
30
30
|
network: EvmNetwork;
|
|
31
31
|
provider: ethers.providers.Web3Provider;
|
|
32
32
|
}): Promise<void>;
|
|
@@ -128,12 +128,11 @@ class WalletConnectV2 extends EthWalletConnector.EthWalletConnector {
|
|
|
128
128
|
supportsNetworkSwitching() {
|
|
129
129
|
return true;
|
|
130
130
|
}
|
|
131
|
-
setupEventListeners(
|
|
131
|
+
setupEventListeners() {
|
|
132
132
|
if (!WalletConnectV2.provider) {
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
135
|
WalletConnectV2.provider.client.on('session_event', ({ params }) => {
|
|
136
|
-
var _a, _b;
|
|
137
136
|
if (!params || !params.event) {
|
|
138
137
|
walletConnectorCore.logger.debug('session_event was called without params or params.event');
|
|
139
138
|
return;
|
|
@@ -145,7 +144,7 @@ class WalletConnectV2 extends EthWalletConnector.EthWalletConnector {
|
|
|
145
144
|
walletConnectorCore.logger.debug(`received unexpected data for chainChanged: ${data} with type ${typeof data}}`);
|
|
146
145
|
return;
|
|
147
146
|
}
|
|
148
|
-
(
|
|
147
|
+
this.emit('chainChange', { chain: String(chainId) });
|
|
149
148
|
// When a user switches network from their wallet, we need the provider to change network
|
|
150
149
|
// such that any future calls to `getNetwork` will return the correct network
|
|
151
150
|
this.switchNetwork({ networkChainId: chainId });
|
|
@@ -158,13 +157,12 @@ class WalletConnectV2 extends EthWalletConnector.EthWalletConnector {
|
|
|
158
157
|
// eslint-disable-next-line prefer-destructuring
|
|
159
158
|
const account = data[0].split(':')[2];
|
|
160
159
|
this.setActiveAccount(account);
|
|
161
|
-
(
|
|
160
|
+
this.emit('accountChange', { accounts: [account] });
|
|
162
161
|
}
|
|
163
162
|
});
|
|
164
163
|
WalletConnectV2.provider.client.on('session_delete', () => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
165
|
-
var _a;
|
|
166
164
|
this.endSession();
|
|
167
|
-
|
|
165
|
+
this.emit('disconnect');
|
|
168
166
|
}));
|
|
169
167
|
}
|
|
170
168
|
teardownEventListeners() {
|
|
@@ -245,11 +243,7 @@ class WalletConnectV2 extends EthWalletConnector.EthWalletConnector {
|
|
|
245
243
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
246
244
|
const raceConditionPromise = new Promise((resolve) => {
|
|
247
245
|
// Create listener for chain change event
|
|
248
|
-
this.
|
|
249
|
-
onChainChange: () => _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
250
|
-
resolve({ success: false });
|
|
251
|
-
}),
|
|
252
|
-
});
|
|
246
|
+
this.on('chainChange', () => resolve({ success: false }));
|
|
253
247
|
signMessageFn(messageToSign).then((result) => resolve({ signedMessage: result, success: true }));
|
|
254
248
|
});
|
|
255
249
|
const signedMessageResult = yield raceConditionPromise;
|
|
@@ -362,7 +356,8 @@ class WalletConnectV2 extends EthWalletConnector.EthWalletConnector {
|
|
|
362
356
|
if (!provider) {
|
|
363
357
|
throw new utils.DynamicError('Provider not found');
|
|
364
358
|
}
|
|
365
|
-
|
|
359
|
+
yield _super.providerSwitchNetwork.call(this, { network, provider });
|
|
360
|
+
this.emit('chainChange', { chain: String(network.chainId) });
|
|
366
361
|
});
|
|
367
362
|
}
|
|
368
363
|
getConnectedAccounts() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ethers } from 'ethers';
|
|
2
2
|
import type { SessionTypes } from '@walletconnect/types';
|
|
3
|
-
import { Chain, FetchPublicAddressOpts
|
|
3
|
+
import { Chain, FetchPublicAddressOpts } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
import { EvmNetwork } from '@dynamic-labs/types';
|
|
5
5
|
import { EthWalletConnector, EthWalletConnectorOpts } from '../EthWalletConnector';
|
|
6
6
|
export type WalletConnectorV2Opts = EthWalletConnectorOpts & {
|
|
@@ -28,7 +28,7 @@ export declare class WalletConnectV2 extends EthWalletConnector {
|
|
|
28
28
|
get sessionTopicKey(): string;
|
|
29
29
|
get activeAccountKey(): string;
|
|
30
30
|
supportsNetworkSwitching(): boolean;
|
|
31
|
-
setupEventListeners(
|
|
31
|
+
setupEventListeners(): void;
|
|
32
32
|
teardownEventListeners(): void;
|
|
33
33
|
getWeb3Provider(): ethers.providers.Web3Provider | undefined;
|
|
34
34
|
fetchPublicAddress(opts?: FetchPublicAddressOpts): Promise<string | undefined>;
|
|
@@ -119,12 +119,11 @@ class WalletConnectV2 extends EthWalletConnector {
|
|
|
119
119
|
supportsNetworkSwitching() {
|
|
120
120
|
return true;
|
|
121
121
|
}
|
|
122
|
-
setupEventListeners(
|
|
122
|
+
setupEventListeners() {
|
|
123
123
|
if (!WalletConnectV2.provider) {
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
126
|
WalletConnectV2.provider.client.on('session_event', ({ params }) => {
|
|
127
|
-
var _a, _b;
|
|
128
127
|
if (!params || !params.event) {
|
|
129
128
|
logger.debug('session_event was called without params or params.event');
|
|
130
129
|
return;
|
|
@@ -136,7 +135,7 @@ class WalletConnectV2 extends EthWalletConnector {
|
|
|
136
135
|
logger.debug(`received unexpected data for chainChanged: ${data} with type ${typeof data}}`);
|
|
137
136
|
return;
|
|
138
137
|
}
|
|
139
|
-
(
|
|
138
|
+
this.emit('chainChange', { chain: String(chainId) });
|
|
140
139
|
// When a user switches network from their wallet, we need the provider to change network
|
|
141
140
|
// such that any future calls to `getNetwork` will return the correct network
|
|
142
141
|
this.switchNetwork({ networkChainId: chainId });
|
|
@@ -149,13 +148,12 @@ class WalletConnectV2 extends EthWalletConnector {
|
|
|
149
148
|
// eslint-disable-next-line prefer-destructuring
|
|
150
149
|
const account = data[0].split(':')[2];
|
|
151
150
|
this.setActiveAccount(account);
|
|
152
|
-
(
|
|
151
|
+
this.emit('accountChange', { accounts: [account] });
|
|
153
152
|
}
|
|
154
153
|
});
|
|
155
154
|
WalletConnectV2.provider.client.on('session_delete', () => __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
var _a;
|
|
157
155
|
this.endSession();
|
|
158
|
-
|
|
156
|
+
this.emit('disconnect');
|
|
159
157
|
}));
|
|
160
158
|
}
|
|
161
159
|
teardownEventListeners() {
|
|
@@ -236,11 +234,7 @@ class WalletConnectV2 extends EthWalletConnector {
|
|
|
236
234
|
return __awaiter(this, void 0, void 0, function* () {
|
|
237
235
|
const raceConditionPromise = new Promise((resolve) => {
|
|
238
236
|
// Create listener for chain change event
|
|
239
|
-
this.
|
|
240
|
-
onChainChange: () => __awaiter(this, void 0, void 0, function* () {
|
|
241
|
-
resolve({ success: false });
|
|
242
|
-
}),
|
|
243
|
-
});
|
|
237
|
+
this.on('chainChange', () => resolve({ success: false }));
|
|
244
238
|
signMessageFn(messageToSign).then((result) => resolve({ signedMessage: result, success: true }));
|
|
245
239
|
});
|
|
246
240
|
const signedMessageResult = yield raceConditionPromise;
|
|
@@ -353,7 +347,8 @@ class WalletConnectV2 extends EthWalletConnector {
|
|
|
353
347
|
if (!provider) {
|
|
354
348
|
throw new DynamicError('Provider not found');
|
|
355
349
|
}
|
|
356
|
-
|
|
350
|
+
yield _super.providerSwitchNetwork.call(this, { network, provider });
|
|
351
|
+
this.emit('chainChange', { chain: String(network.chainId) });
|
|
357
352
|
});
|
|
358
353
|
}
|
|
359
354
|
getConnectedAccounts() {
|