@interchain-kit/react 0.2.213 → 0.2.214

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.
@@ -15,17 +15,20 @@ export const WalletModalProvider = ({ children, }) => {
15
15
  const [shouldShowList, setShouldShowList] = useState(!(currentChainName && currentWalletName));
16
16
  const walletsForUI = wallets.map(transferToWalletUISchema);
17
17
  useEffect(() => {
18
- if (walletNameToConnect) {
19
- try {
20
- connect();
21
- setWalletNameToConnect(null);
22
- setShouldShowList(false);
18
+ const handleConnect = async () => {
19
+ if (walletNameToConnect) {
20
+ try {
21
+ await connect();
22
+ setWalletNameToConnect(null);
23
+ setShouldShowList(false);
24
+ }
25
+ catch (error) {
26
+ console.error("Error connecting to wallet:", error);
27
+ throw error;
28
+ }
23
29
  }
24
- catch (error) {
25
- console.error("Error connecting to wallet:", error);
26
- throw error;
27
- }
28
- }
30
+ };
31
+ handleConnect();
29
32
  }, [walletNameToConnect]);
30
33
  const handleCloseModal = () => {
31
34
  close();
package/modal/provider.js CHANGED
@@ -18,17 +18,20 @@ const WalletModalProvider = ({ children, }) => {
18
18
  const [shouldShowList, setShouldShowList] = (0, react_1.useState)(!(currentChainName && currentWalletName));
19
19
  const walletsForUI = wallets.map(utils_1.transferToWalletUISchema);
20
20
  (0, react_1.useEffect)(() => {
21
- if (walletNameToConnect) {
22
- try {
23
- connect();
24
- setWalletNameToConnect(null);
25
- setShouldShowList(false);
21
+ const handleConnect = async () => {
22
+ if (walletNameToConnect) {
23
+ try {
24
+ await connect();
25
+ setWalletNameToConnect(null);
26
+ setShouldShowList(false);
27
+ }
28
+ catch (error) {
29
+ console.error("Error connecting to wallet:", error);
30
+ throw error;
31
+ }
26
32
  }
27
- catch (error) {
28
- console.error("Error connecting to wallet:", error);
29
- throw error;
30
- }
31
- }
33
+ };
34
+ handleConnect();
32
35
  }, [walletNameToConnect]);
33
36
  const handleCloseModal = () => {
34
37
  close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interchain-kit/react",
3
- "version": "0.2.213",
3
+ "version": "0.2.214",
4
4
  "author": "Hyperweb <developers@hyperweb.io>",
5
5
  "description": "interchain-kit wallet connector react package",
6
6
  "main": "index.js",
@@ -34,7 +34,7 @@
34
34
  "keywords": [],
35
35
  "dependencies": {
36
36
  "@chain-registry/v2-types": "^0.53.40",
37
- "@interchain-kit/core": "0.2.213",
37
+ "@interchain-kit/core": "0.2.214",
38
38
  "@interchain-ui/react": "1.26.3",
39
39
  "@interchainjs/cosmos": "1.10.1",
40
40
  "@interchainjs/cosmos-types": "1.10.1",
@@ -61,5 +61,5 @@
61
61
  "jest-environment-jsdom": "^29.7.0",
62
62
  "ts-jest": "^29.3.0"
63
63
  },
64
- "gitHead": "84f8fb7dd30bfa0f520c115a26abf69fe411b97d"
64
+ "gitHead": "69acee3506ab58fb0fc9c2c9456b3522c8f103d3"
65
65
  }