@dynamic-labs/wagmi-connector 2.0.0 → 2.0.2

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,25 @@
1
1
 
2
+ ### [2.0.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.1...v2.0.2) (2024-04-19)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * buffer polyfill for utils package ([#5404](https://github.com/dynamic-labs/DynamicAuth/issues/5404)) ([#5405](https://github.com/dynamic-labs/DynamicAuth/issues/5405)) ([679c197](https://github.com/dynamic-labs/DynamicAuth/commit/679c197a52969a0db614ed280d7b9a0bf172bf72))
8
+
9
+ ### [2.0.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0...v2.0.1) (2024-04-18)
10
+
11
+
12
+ ### Features
13
+
14
+ * add redirectUri to farcaster connect ([#5373](https://github.com/dynamic-labs/DynamicAuth/issues/5373)) ([#5383](https://github.com/dynamic-labs/DynamicAuth/issues/5383)) ([d031d7e](https://github.com/dynamic-labs/DynamicAuth/commit/d031d7ee5705de5ec83ef328f03633d5f3524786))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * copy and ui fixes ([#5367](https://github.com/dynamic-labs/DynamicAuth/issues/5367)) ([e39ea97](https://github.com/dynamic-labs/DynamicAuth/commit/e39ea97d98de6b7087c24f2326a5fdc07ab9c8c3))
20
+ * bitcoin connector improvements
21
+ * solana package improvements ([#5360](https://github.com/dynamic-labs/DynamicAuth/issues/5360)) ([#5385](https://github.com/dynamic-labs/DynamicAuth/issues/5385)) ([9010bce](https://github.com/dynamic-labs/DynamicAuth/commit/9010bcebb4b0f2d293d517347187d38accbac0d3))
22
+
2
23
  ## [2.0.0-alpha.32](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.31...v2.0.0-alpha.32) (2024-04-15)
3
24
 
4
25
  ## [2.0.0-alpha.31](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.30...v2.0.0-alpha.31) (2024-04-11)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wagmi-connector",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -11,11 +11,11 @@
11
11
  "react": "^18.0.0",
12
12
  "viem": "^2.7.6",
13
13
  "wagmi": "^2.5.7",
14
- "@dynamic-labs/logger": "2.0.0",
15
- "@dynamic-labs/rpc-providers": "2.0.0",
16
- "@dynamic-labs/sdk-react-core": "2.0.0",
17
- "@dynamic-labs/types": "2.0.0",
18
- "@dynamic-labs/wallet-connector-core": "2.0.0",
14
+ "@dynamic-labs/logger": "2.0.2",
15
+ "@dynamic-labs/rpc-providers": "2.0.2",
16
+ "@dynamic-labs/sdk-react-core": "2.0.2",
17
+ "@dynamic-labs/types": "2.0.2",
18
+ "@dynamic-labs/wallet-connector-core": "2.0.2",
19
19
  "eventemitter3": "5.0.1"
20
20
  },
21
21
  "license": "MIT",
@@ -40,8 +40,8 @@ const getCreateConnectorFn = (parameters) => createConnector((config) => ({
40
40
  });
41
41
  },
42
42
  getAccounts() {
43
- var _a;
44
43
  return __awaiter(this, void 0, void 0, function* () {
44
+ var _a;
45
45
  const address = yield ((_a = parameters.walletConnector) === null || _a === void 0 ? void 0 : _a.getAddress());
46
46
  if (!address) {
47
47
  throw new Error('Not connected');
@@ -62,8 +62,8 @@ const getCreateConnectorFn = (parameters) => createConnector((config) => ({
62
62
  });
63
63
  },
64
64
  getClient(args) {
65
- var _a, _b;
66
65
  return __awaiter(this, void 0, void 0, function* () {
66
+ var _a, _b;
67
67
  const signer = yield parameters.walletConnector.getSigner();
68
68
  if (signer.account && signer.chain) {
69
69
  return signer;
@@ -77,15 +77,15 @@ const getCreateConnectorFn = (parameters) => createConnector((config) => ({
77
77
  });
78
78
  },
79
79
  getProvider() {
80
- var _a;
81
80
  return __awaiter(this, void 0, void 0, function* () {
81
+ var _a;
82
82
  return (_a = parameters.walletConnector) === null || _a === void 0 ? void 0 : _a.getWalletClient();
83
83
  });
84
84
  },
85
85
  id: parameters.connectorId,
86
86
  isAuthorized() {
87
- var _a, _b;
88
87
  return __awaiter(this, void 0, void 0, function* () {
88
+ var _a, _b;
89
89
  const accounts = (_b = (yield ((_a = parameters.walletConnector) === null || _a === void 0 ? void 0 : _a.getConnectedAccounts()))) !== null && _b !== void 0 ? _b : [];
90
90
  return accounts.length > 0;
91
91
  });
@@ -102,14 +102,14 @@ const getCreateConnectorFn = (parameters) => createConnector((config) => ({
102
102
  });
103
103
  },
104
104
  onDisconnect() { },
105
- switchChain({ chainId }) {
106
- var _a;
107
- return __awaiter(this, void 0, void 0, function* () {
105
+ switchChain(_a) {
106
+ return __awaiter(this, arguments, void 0, function* ({ chainId }) {
107
+ var _b;
108
108
  const chain = config.chains.find((x) => x.id === chainId);
109
109
  if (!chain) {
110
110
  throw new Error(`Chain ${chainId} is not supported`);
111
111
  }
112
- yield ((_a = parameters.walletConnector) === null || _a === void 0 ? void 0 : _a.switchNetwork({
112
+ yield ((_b = parameters.walletConnector) === null || _b === void 0 ? void 0 : _b.switchNetwork({
113
113
  networkChainId: chainId,
114
114
  }));
115
115
  return chain;