@interchain-kit/react 0.0.1-beta.50 → 0.0.1-beta.51

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.
@@ -14,12 +14,13 @@ export const WalletModal = () => {
14
14
  const currentWallet = walletManager
15
15
  .getWalletRepositoryByName(wallet.info.name)
16
16
  .getChainAccountByName(walletManager.currentChainName);
17
+ console.log(wallet.info.name, walletManager.currentChainName, Boolean(currentWallet));
17
18
  setModalView({
18
19
  header: _jsx(ConnectingHeader, { wallet: wallet, onBack: gotoWalletList }),
19
20
  content: _jsx(ConnectingContent, { wallet: wallet }),
20
21
  });
21
- if (currentWallet.wallet?.info.mode === "extension" &&
22
- !currentWallet.wallet.isExtensionInstalled) {
22
+ if (currentWallet?.wallet?.info.mode === "extension" &&
23
+ !(currentWallet?.wallet).isExtensionInstalled) {
23
24
  setModalView({
24
25
  header: (_jsx(NotExistHeader, { wallet: currentWallet, onBack: gotoWalletList })),
25
26
  content: _jsx(NotExistContent, { wallet: currentWallet }),
@@ -27,17 +28,17 @@ export const WalletModal = () => {
27
28
  return;
28
29
  }
29
30
  try {
30
- if (currentWallet.wallet?.info.mode === "wallet-connect") {
31
- currentWallet.wallet.setOnPairingUriCreatedCallback(() => {
31
+ if (currentWallet?.wallet?.info.mode === "wallet-connect") {
32
+ (currentWallet?.wallet).setOnPairingUriCreatedCallback(() => {
32
33
  setModalView({
33
34
  header: _jsx(QRCodeHeader, { onBack: gotoWalletList }),
34
35
  content: _jsx(QRCodeContent, {}),
35
36
  });
36
37
  });
37
- currentWallet.wallet.setPairingToConnect(wallet.pairing);
38
+ (currentWallet?.wallet).setPairingToConnect(wallet.pairing);
38
39
  }
39
- await currentWallet.connect();
40
- await currentWallet.getAccount();
40
+ await currentWallet?.connect();
41
+ await currentWallet?.getAccount();
41
42
  setModalView({
42
43
  header: _jsx(ConnectedHeader, { onBack: gotoWalletList }),
43
44
  content: _jsx(ConnectedContent, {}),
package/modal/modal.js CHANGED
@@ -17,12 +17,13 @@ const WalletModal = () => {
17
17
  const currentWallet = walletManager
18
18
  .getWalletRepositoryByName(wallet.info.name)
19
19
  .getChainAccountByName(walletManager.currentChainName);
20
+ console.log(wallet.info.name, walletManager.currentChainName, Boolean(currentWallet));
20
21
  setModalView({
21
22
  header: (0, jsx_runtime_1.jsx)(views_1.ConnectingHeader, { wallet: wallet, onBack: gotoWalletList }),
22
23
  content: (0, jsx_runtime_1.jsx)(views_1.ConnectingContent, { wallet: wallet }),
23
24
  });
24
- if (currentWallet.wallet?.info.mode === "extension" &&
25
- !currentWallet.wallet.isExtensionInstalled) {
25
+ if (currentWallet?.wallet?.info.mode === "extension" &&
26
+ !(currentWallet?.wallet).isExtensionInstalled) {
26
27
  setModalView({
27
28
  header: ((0, jsx_runtime_1.jsx)(views_1.NotExistHeader, { wallet: currentWallet, onBack: gotoWalletList })),
28
29
  content: (0, jsx_runtime_1.jsx)(views_1.NotExistContent, { wallet: currentWallet }),
@@ -30,17 +31,17 @@ const WalletModal = () => {
30
31
  return;
31
32
  }
32
33
  try {
33
- if (currentWallet.wallet?.info.mode === "wallet-connect") {
34
- currentWallet.wallet.setOnPairingUriCreatedCallback(() => {
34
+ if (currentWallet?.wallet?.info.mode === "wallet-connect") {
35
+ (currentWallet?.wallet).setOnPairingUriCreatedCallback(() => {
35
36
  setModalView({
36
37
  header: (0, jsx_runtime_1.jsx)(views_1.QRCodeHeader, { onBack: gotoWalletList }),
37
38
  content: (0, jsx_runtime_1.jsx)(views_1.QRCodeContent, {}),
38
39
  });
39
40
  });
40
- currentWallet.wallet.setPairingToConnect(wallet.pairing);
41
+ (currentWallet?.wallet).setPairingToConnect(wallet.pairing);
41
42
  }
42
- await currentWallet.connect();
43
- await currentWallet.getAccount();
43
+ await currentWallet?.connect();
44
+ await currentWallet?.getAccount();
44
45
  setModalView({
45
46
  header: (0, jsx_runtime_1.jsx)(views_1.ConnectedHeader, { onBack: gotoWalletList }),
46
47
  content: (0, jsx_runtime_1.jsx)(views_1.ConnectedContent, {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interchain-kit/react",
3
- "version": "0.0.1-beta.50",
3
+ "version": "0.0.1-beta.51",
4
4
  "author": "cosmology-tech <developers@cosmology.zone>",
5
5
  "description": "interchain-kit wallet connector react package",
6
6
  "main": "index.js",
@@ -33,7 +33,7 @@
33
33
  "keywords": [],
34
34
  "dependencies": {
35
35
  "@chain-registry/v2-types": "^0.53.40",
36
- "@interchain-kit/core": "0.0.1-beta.50",
36
+ "@interchain-kit/core": "0.0.1-beta.51",
37
37
  "@interchain-ui/react": "1.26.1",
38
38
  "@interchainjs/cosmos": "1.6.3",
39
39
  "@interchainjs/cosmos-types": "1.6.3",
@@ -48,5 +48,5 @@
48
48
  "react": "^18.3.1",
49
49
  "react-dom": "^18.3.1"
50
50
  },
51
- "gitHead": "c8799c021ad3b801da6e1ef1c05f073908fb0bde"
51
+ "gitHead": "9e654a387647809d840c118c1f281f3a8fc4c700"
52
52
  }