@dynamic-labs/ethereum 0.17.0-RC.19 → 0.17.0-RC.20

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,23 @@
1
1
 
2
+ ## [0.17.0-RC.20](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.19...v0.17.0-RC.20) (2023-06-01)
3
+
4
+
5
+ ### Features
6
+
7
+ * add AccessDeniedContext to lift denied wallet state up ([#2180](https://github.com/dynamic-labs/DynamicAuth/issues/2180)) ([509519d](https://github.com/dynamic-labs/DynamicAuth/commit/509519d08496248545f1548f676b13e140473e41))
8
+ * **DYN-2338:** update magic icons to social icons ([#2176](https://github.com/dynamic-labs/DynamicAuth/issues/2176)) ([42a4f63](https://github.com/dynamic-labs/DynamicAuth/commit/42a4f6367e6fa4ad8736f9ac42f535c8a9c1d377))
9
+ * **DynamicWidget:** add send balance button ([#2183](https://github.com/dynamic-labs/DynamicAuth/issues/2183)) ([d76355e](https://github.com/dynamic-labs/DynamicAuth/commit/d76355e1f9c3a7b05cbb5b7b3144dad379586689))
10
+ * handle magic redirect error ([#2203](https://github.com/dynamic-labs/DynamicAuth/issues/2203)) ([9a088c6](https://github.com/dynamic-labs/DynamicAuth/commit/9a088c6aad2eb2c1045f544a784083d2732df440))
11
+ * **SendBalanceModal:** adds openSendBalanceModal in dynamic context ([#2159](https://github.com/dynamic-labs/DynamicAuth/issues/2159)) ([f89b21b](https://github.com/dynamic-labs/DynamicAuth/commit/f89b21bfcd65bb61ef33b17b460140404574b235))
12
+ * social error handling improvements ([#2146](https://github.com/dynamic-labs/DynamicAuth/issues/2146)) ([a64a26a](https://github.com/dynamic-labs/DynamicAuth/commit/a64a26aa42c228654cb135cd6c4778e8bd2bd0e6))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * amendments to user profile ([#2201](https://github.com/dynamic-labs/DynamicAuth/issues/2201)) ([5d12c17](https://github.com/dynamic-labs/DynamicAuth/commit/5d12c1716cdcd8d843ef3ff941e163bad28573b1))
18
+ * **formatBigNumber:** display the ceil value when value is too low ([#2165](https://github.com/dynamic-labs/DynamicAuth/issues/2165)) ([ad56fe1](https://github.com/dynamic-labs/DynamicAuth/commit/ad56fe11d55ee038e08ef77dfa2bd6155fee7fe3))
19
+ * use wcv2 only if wallet supports it ([#2198](https://github.com/dynamic-labs/DynamicAuth/issues/2198)) ([3d5fea7](https://github.com/dynamic-labs/DynamicAuth/commit/3d5fea7743a18b47f33ef371ecc2652003accb4d))
20
+
2
21
  ## [0.17.0-RC.19](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.18...v0.17.0-RC.19) (2023-05-30)
3
22
 
4
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum",
3
- "version": "0.17.0-RC.19",
3
+ "version": "0.17.0-RC.20",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -32,10 +32,10 @@
32
32
  "@walletconnect/universal-provider": "2.7.4",
33
33
  "ethers": "5.7.2",
34
34
  "buffer": "6.0.3",
35
- "@dynamic-labs/rpc-providers": "0.17.0-RC.19",
36
- "@dynamic-labs/types": "0.17.0-RC.19",
37
- "@dynamic-labs/utils": "0.17.0-RC.19",
38
- "@dynamic-labs/wallet-connector-core": "0.17.0-RC.19"
35
+ "@dynamic-labs/rpc-providers": "0.17.0-RC.20",
36
+ "@dynamic-labs/types": "0.17.0-RC.20",
37
+ "@dynamic-labs/utils": "0.17.0-RC.20",
38
+ "@dynamic-labs/wallet-connector-core": "0.17.0-RC.20"
39
39
  },
40
40
  "peerDependencies": {}
41
41
  }
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var _tslib = require('../../_virtual/_tslib.cjs');
4
+ var walletBook = require('@dynamic-labs/wallet-book');
4
5
  var ethProviderHelper = require('../ethProviderHelper.cjs');
5
6
  var EthWalletConnector = require('../EthWalletConnector.cjs');
6
7
  var walletConnectV2 = require('../walletConnect/walletConnectV2.cjs');
7
8
  var walletConnect = require('../walletConnect/walletConnect.cjs');
8
- require('@dynamic-labs/wallet-book');
9
9
 
10
10
  class InjectedWalletBase extends EthWalletConnector.EthWalletConnector {
11
11
  constructor() {
@@ -15,9 +15,11 @@ class InjectedWalletBase extends EthWalletConnector.EthWalletConnector {
15
15
  this.walletConnectorFallback = false;
16
16
  }
17
17
  getMobileOrInstalledWallet() {
18
- var _a;
18
+ var _a, _b, _c;
19
19
  if (this.walletConnectorFallback && !this.isInstalledOnBrowser()) {
20
- if ((_a = this.constructorProps) === null || _a === void 0 ? void 0 : _a.isWalletConnectV2Enabled) {
20
+ const wallet = walletBook.getWalletBookWallet(this.name);
21
+ if (((_a = this.constructorProps) === null || _a === void 0 ? void 0 : _a.isWalletConnectV2Enabled) &&
22
+ ((_c = (_b = wallet.walletConnect) === null || _b === void 0 ? void 0 : _b.sdks) === null || _c === void 0 ? void 0 : _c.includes('sign_v2'))) {
21
23
  return new walletConnectV2.WalletConnectV2(Object.assign(Object.assign({}, this.constructorProps), { walletName: this.name }));
22
24
  }
23
25
  else {
@@ -1,9 +1,9 @@
1
1
  import { __awaiter } from '../../_virtual/_tslib.js';
2
+ import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
2
3
  import { EthProviderHelper } from '../ethProviderHelper.js';
3
4
  import { EthWalletConnector } from '../EthWalletConnector.js';
4
5
  import { WalletConnectV2 } from '../walletConnect/walletConnectV2.js';
5
6
  import { WalletConnect } from '../walletConnect/walletConnect.js';
6
- import '@dynamic-labs/wallet-book';
7
7
 
8
8
  class InjectedWalletBase extends EthWalletConnector {
9
9
  constructor() {
@@ -13,9 +13,11 @@ class InjectedWalletBase extends EthWalletConnector {
13
13
  this.walletConnectorFallback = false;
14
14
  }
15
15
  getMobileOrInstalledWallet() {
16
- var _a;
16
+ var _a, _b, _c;
17
17
  if (this.walletConnectorFallback && !this.isInstalledOnBrowser()) {
18
- if ((_a = this.constructorProps) === null || _a === void 0 ? void 0 : _a.isWalletConnectV2Enabled) {
18
+ const wallet = getWalletBookWallet(this.name);
19
+ if (((_a = this.constructorProps) === null || _a === void 0 ? void 0 : _a.isWalletConnectV2Enabled) &&
20
+ ((_c = (_b = wallet.walletConnect) === null || _b === void 0 ? void 0 : _b.sdks) === null || _c === void 0 ? void 0 : _c.includes('sign_v2'))) {
19
21
  return new WalletConnectV2(Object.assign(Object.assign({}, this.constructorProps), { walletName: this.name }));
20
22
  }
21
23
  else {