@dynamic-labs/wagmi-connector 1.4.6 → 1.4.8

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,22 @@
1
1
 
2
+ ### [1.4.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.7...v1.4.8) (2024-04-18)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * copy and ui fixes ([#5382](https://github.com/dynamic-labs/DynamicAuth/issues/5382)) ([210a52c](https://github.com/dynamic-labs/DynamicAuth/commit/210a52ce85a9812fe20c41445873b3a8b8dc44c2)), closes [#5325](https://github.com/dynamic-labs/DynamicAuth/issues/5325) ([#5339](https://github.com/dynamic-labs/DynamicAuth/issues/5339)) ([c1fde6b](https://github.com/dynamic-labs/DynamicAuth/commit/c1fde6beb1fa2666d71a4ffaed84adb3302665d4))
8
+ * bitcoin connector improvements
9
+
10
+ ### [1.4.7](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.6...v1.4.7) (2024-04-12)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * ui and layout improvements ([#5269](https://github.com/dynamic-labs/DynamicAuth/issues/5269)) ([#5296](https://github.com/dynamic-labs/DynamicAuth/issues/5296)) ([a1f7204](https://github.com/dynamic-labs/DynamicAuth/commit/a1f7204e44b4ae1650f86b76663c0802530935cb)) ([#5270](https://github.com/dynamic-labs/DynamicAuth/issues/5270)) ([#5278](https://github.com/dynamic-labs/DynamicAuth/issues/5278)) ([5f262f5](https://github.com/dynamic-labs/DynamicAuth/commit/5f262f54bba8eb2fa6346040478dd0417f42d2d1))
16
+ * callback trigger fixes ([#5310](https://github.com/dynamic-labs/DynamicAuth/issues/5310)) ([e6f7720](https://github.com/dynamic-labs/DynamicAuth/commit/e6f7720781a68b9d36448e4edea834e6478e7263))
17
+ * improve bridge connect experience on mobile ([#5284](https://github.com/dynamic-labs/DynamicAuth/issues/5284)) ([c8eab02](https://github.com/dynamic-labs/DynamicAuth/commit/c8eab0243ca5752d365fd907fde36b7c08669d5e))
18
+ * improve integration with i18n ([#5267](https://github.com/dynamic-labs/DynamicAuth/issues/5267)) ([#5313](https://github.com/dynamic-labs/DynamicAuth/issues/5313)) ([5f02f72](https://github.com/dynamic-labs/DynamicAuth/commit/5f02f72fe547e93d59a2545ffcce62c20fb22dbe))
19
+
2
20
  ### [1.4.6](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.5...v1.4.6) (2024-04-09)
3
21
 
4
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wagmi-connector",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -10,10 +10,10 @@
10
10
  "react": "^17.0.2 || ^18.0.0",
11
11
  "viem": "^1.19.13 || ^2.2.0",
12
12
  "wagmi": "^1.4.12",
13
- "@dynamic-labs/rpc-providers": "1.4.6",
14
- "@dynamic-labs/sdk-react-core": "1.4.6",
15
- "@dynamic-labs/types": "1.4.6",
16
- "@dynamic-labs/wallet-connector-core": "1.4.6",
13
+ "@dynamic-labs/rpc-providers": "1.4.8",
14
+ "@dynamic-labs/sdk-react-core": "1.4.8",
15
+ "@dynamic-labs/types": "1.4.8",
16
+ "@dynamic-labs/wallet-connector-core": "1.4.8",
17
17
  "eventemitter3": "5.0.1"
18
18
  },
19
19
  "license": "MIT",
@@ -75,8 +75,8 @@ class Connector extends Connector$1 {
75
75
  });
76
76
  }
77
77
  getAccount() {
78
- var _a;
79
78
  return __awaiter(this, void 0, void 0, function* () {
79
+ var _a;
80
80
  const address = yield ((_a = this.walletConnector) === null || _a === void 0 ? void 0 : _a.fetchPublicAddress());
81
81
  if (!address) {
82
82
  throw new Error('Not connected');
@@ -97,14 +97,14 @@ class Connector extends Connector$1 {
97
97
  });
98
98
  }
99
99
  getProvider(config) {
100
- var _a;
101
100
  return __awaiter(this, void 0, void 0, function* () {
101
+ var _a;
102
102
  return (_a = this.walletConnector) === null || _a === void 0 ? void 0 : _a.getWalletClient();
103
103
  });
104
104
  }
105
105
  getWalletClient(config) {
106
- var _a;
107
106
  return __awaiter(this, void 0, void 0, function* () {
107
+ var _a;
108
108
  const signer = yield this.walletConnector.getSigner();
109
109
  if (signer.account && signer.chain) {
110
110
  return signer;
@@ -118,15 +118,15 @@ class Connector extends Connector$1 {
118
118
  });
119
119
  }
120
120
  isAuthorized() {
121
- var _a, _b;
122
121
  return __awaiter(this, void 0, void 0, function* () {
122
+ var _a, _b;
123
123
  const accounts = (_b = (yield ((_a = this.walletConnector) === null || _a === void 0 ? void 0 : _a.getConnectedAccounts()))) !== null && _b !== void 0 ? _b : [];
124
124
  return accounts.length > 0;
125
125
  });
126
126
  }
127
127
  switchChain(chainId) {
128
- var _a, _b;
129
128
  return __awaiter(this, void 0, void 0, function* () {
129
+ var _a, _b;
130
130
  yield ((_a = this.walletConnector) === null || _a === void 0 ? void 0 : _a.switchNetwork({ networkChainId: chainId }));
131
131
  const id = toHex(chainId);
132
132
  return ((_b = this.chains.find((x) => x.id === chainId)) !== null && _b !== void 0 ? _b : {