@dynamic-labs/ethereum 0.18.0-RC.24 → 0.18.0-RC.26
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,36 @@
|
|
|
1
1
|
|
|
2
|
+
## [0.18.0-RC.26](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-RC.24...v0.18.0-RC.26) (2023-08-02)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* displayTermsOfService prop set to false breaks message verfication (#2751)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* send wagmi settings from wagmi connector ([#2791](https://github.com/dynamic-labs/DynamicAuth/issues/2791)) ([#2800](https://github.com/dynamic-labs/DynamicAuth/issues/2800)) ([5b65605](https://github.com/dynamic-labs/DynamicAuth/commit/5b656059361a48de57e01ad2dd81de0bc9b2c7e8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* always call onBeforeConnectSuccess callback when wallet state changes ([#2786](https://github.com/dynamic-labs/DynamicAuth/issues/2786)) ([e2eaef3](https://github.com/dynamic-labs/DynamicAuth/commit/e2eaef3da1f80cdc7dc21e902e9c033e581242d2))
|
|
17
|
+
* displayTermsOfService prop set to false breaks message verfication ([#2751](https://github.com/dynamic-labs/DynamicAuth/issues/2751)) ([6433732](https://github.com/dynamic-labs/DynamicAuth/commit/6433732fac87d641f2475d19ef743ac31130274f))
|
|
18
|
+
* ensure auto-redirect back to dapp after message signing ([#2783](https://github.com/dynamic-labs/DynamicAuth/issues/2783)) ([dba4664](https://github.com/dynamic-labs/DynamicAuth/commit/dba466473ecc2afd808cdae0fd9023d38676b01f))
|
|
19
|
+
* use css.supports only when available ([#2802](https://github.com/dynamic-labs/DynamicAuth/issues/2802)) ([7651898](https://github.com/dynamic-labs/DynamicAuth/commit/76518982a97e728ab65549f37f55b537eed4e890))
|
|
20
|
+
|
|
21
|
+
## [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)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### ⚠ BREAKING CHANGES
|
|
25
|
+
|
|
26
|
+
* displayTermsOfService prop set to false breaks message verfication (#2751)
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* always call onBeforeConnectSuccess callback when wallet state changes ([#2786](https://github.com/dynamic-labs/DynamicAuth/issues/2786)) ([e2eaef3](https://github.com/dynamic-labs/DynamicAuth/commit/e2eaef3da1f80cdc7dc21e902e9c033e581242d2))
|
|
31
|
+
* displayTermsOfService prop set to false breaks message verfication ([#2751](https://github.com/dynamic-labs/DynamicAuth/issues/2751)) ([6433732](https://github.com/dynamic-labs/DynamicAuth/commit/6433732fac87d641f2475d19ef743ac31130274f))
|
|
32
|
+
* ensure auto-redirect back to dapp after message signing ([#2783](https://github.com/dynamic-labs/DynamicAuth/issues/2783)) ([dba4664](https://github.com/dynamic-labs/DynamicAuth/commit/dba466473ecc2afd808cdae0fd9023d38676b01f))
|
|
33
|
+
|
|
2
34
|
## [0.18.0-RC.24](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-RC.23...v0.18.0-RC.24) (2023-08-01)
|
|
3
35
|
|
|
4
36
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum",
|
|
3
|
-
"version": "0.18.0-RC.
|
|
3
|
+
"version": "0.18.0-RC.26",
|
|
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.18.0-RC.
|
|
36
|
-
"@dynamic-labs/types": "0.18.0-RC.
|
|
37
|
-
"@dynamic-labs/utils": "0.18.0-RC.
|
|
38
|
-
"@dynamic-labs/wallet-book": "0.18.0-RC.
|
|
39
|
-
"@dynamic-labs/wallet-connector-core": "0.18.0-RC.
|
|
35
|
+
"@dynamic-labs/rpc-providers": "0.18.0-RC.26",
|
|
36
|
+
"@dynamic-labs/types": "0.18.0-RC.26",
|
|
37
|
+
"@dynamic-labs/utils": "0.18.0-RC.26",
|
|
38
|
+
"@dynamic-labs/wallet-book": "0.18.0-RC.26",
|
|
39
|
+
"@dynamic-labs/wallet-connector-core": "0.18.0-RC.26",
|
|
40
40
|
"@ethersproject/providers": "5.7.2"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {}
|
|
@@ -259,8 +259,21 @@ class WalletConnectV2 extends EthWalletConnector.EthWalletConnector {
|
|
|
259
259
|
return signedMessageResult.signedMessage;
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
|
-
|
|
262
|
+
getDeepLink() {
|
|
263
263
|
var _a, _b;
|
|
264
|
+
if (!this.session) {
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
const metadata = walletBook.getWalletBookWallet(this.walletBook, this.name);
|
|
268
|
+
const deepLink = ((_a = metadata['mobile']) === null || _a === void 0 ? void 0 : _a.native) || ((_b = metadata['mobile']) === null || _b === void 0 ? void 0 : _b.universal);
|
|
269
|
+
if (!deepLink) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
// we need to include the session topic here because it helps the wallet
|
|
273
|
+
// auto redirect back to the dapp after signing
|
|
274
|
+
return `${deepLink}?sessionTopic=${this.session.topic}`;
|
|
275
|
+
}
|
|
276
|
+
signMessage(messageToSign) {
|
|
264
277
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
265
278
|
if (!this.session) {
|
|
266
279
|
throw new utils.DynamicError('no session');
|
|
@@ -268,9 +281,8 @@ class WalletConnectV2 extends EthWalletConnector.EthWalletConnector {
|
|
|
268
281
|
if (!WalletConnectV2.provider) {
|
|
269
282
|
throw new utils.DynamicError('No WalletConnect provider found to handle signing');
|
|
270
283
|
}
|
|
271
|
-
const
|
|
272
|
-
if (utils.isMobile()) {
|
|
273
|
-
const deepLink = ((_a = metadata['mobile']) === null || _a === void 0 ? void 0 : _a.native) || ((_b = metadata['mobile']) === null || _b === void 0 ? void 0 : _b.universal) || '';
|
|
284
|
+
const deepLink = this.getDeepLink();
|
|
285
|
+
if (utils.isMobile() && deepLink) {
|
|
274
286
|
window.location.href = deepLink;
|
|
275
287
|
}
|
|
276
288
|
const web3Provider = this.getWeb3Provider();
|
|
@@ -44,6 +44,7 @@ export declare class WalletConnectV2 extends EthWalletConnector {
|
|
|
44
44
|
* @returns
|
|
45
45
|
*/
|
|
46
46
|
protected waitForSignMessage(signMessageFn: (messageToSign: string) => Promise<string | undefined>, messageToSign: string): Promise<string | undefined>;
|
|
47
|
+
getDeepLink(): string | undefined;
|
|
47
48
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
48
49
|
private clearActiveAccount;
|
|
49
50
|
private clearSession;
|
|
@@ -250,8 +250,21 @@ class WalletConnectV2 extends EthWalletConnector {
|
|
|
250
250
|
return signedMessageResult.signedMessage;
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
-
|
|
253
|
+
getDeepLink() {
|
|
254
254
|
var _a, _b;
|
|
255
|
+
if (!this.session) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
const metadata = getWalletBookWallet(this.walletBook, this.name);
|
|
259
|
+
const deepLink = ((_a = metadata['mobile']) === null || _a === void 0 ? void 0 : _a.native) || ((_b = metadata['mobile']) === null || _b === void 0 ? void 0 : _b.universal);
|
|
260
|
+
if (!deepLink) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
// we need to include the session topic here because it helps the wallet
|
|
264
|
+
// auto redirect back to the dapp after signing
|
|
265
|
+
return `${deepLink}?sessionTopic=${this.session.topic}`;
|
|
266
|
+
}
|
|
267
|
+
signMessage(messageToSign) {
|
|
255
268
|
return __awaiter(this, void 0, void 0, function* () {
|
|
256
269
|
if (!this.session) {
|
|
257
270
|
throw new DynamicError('no session');
|
|
@@ -259,9 +272,8 @@ class WalletConnectV2 extends EthWalletConnector {
|
|
|
259
272
|
if (!WalletConnectV2.provider) {
|
|
260
273
|
throw new DynamicError('No WalletConnect provider found to handle signing');
|
|
261
274
|
}
|
|
262
|
-
const
|
|
263
|
-
if (isMobile()) {
|
|
264
|
-
const deepLink = ((_a = metadata['mobile']) === null || _a === void 0 ? void 0 : _a.native) || ((_b = metadata['mobile']) === null || _b === void 0 ? void 0 : _b.universal) || '';
|
|
275
|
+
const deepLink = this.getDeepLink();
|
|
276
|
+
if (isMobile() && deepLink) {
|
|
265
277
|
window.location.href = deepLink;
|
|
266
278
|
}
|
|
267
279
|
const web3Provider = this.getWeb3Provider();
|