@interchain-kit/react 0.0.1-beta.2 → 0.0.1-beta.21

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.
Files changed (58) hide show
  1. package/README.md +127 -12
  2. package/esm/hooks/index.js +1 -0
  3. package/esm/hooks/useAccount.js +10 -6
  4. package/esm/hooks/useActiveWallet.js +8 -0
  5. package/esm/hooks/useChain.js +25 -2
  6. package/esm/hooks/useConfig.js +10 -0
  7. package/esm/hooks/useInterchainClient.js +38 -39
  8. package/esm/hooks/useOfflineSigner.js +15 -0
  9. package/esm/hooks/useWalletManager.js +2 -2
  10. package/esm/modal/modal.js +42 -13
  11. package/esm/modal/provider.js +1 -2
  12. package/esm/modal/views/Astronaut.js +4 -0
  13. package/esm/modal/views/Connected.js +32 -0
  14. package/esm/modal/views/Connecting.js +33 -0
  15. package/esm/modal/views/QRCode.js +15 -0
  16. package/esm/modal/views/Reject.js +16 -0
  17. package/esm/modal/views/WalletList.js +32 -0
  18. package/esm/modal/views/index.js +5 -0
  19. package/esm/provider.js +9 -9
  20. package/esm/utils/index.js +8 -1
  21. package/esm/utils/wallet.js +1 -0
  22. package/hooks/index.d.ts +1 -0
  23. package/hooks/index.js +1 -0
  24. package/hooks/useAccount.js +10 -6
  25. package/hooks/useActiveWallet.js +8 -0
  26. package/hooks/useChain.d.ts +2 -2
  27. package/hooks/useChain.js +25 -2
  28. package/hooks/useConfig.d.ts +8 -0
  29. package/hooks/useConfig.js +14 -0
  30. package/hooks/useInterchainClient.d.ts +8 -7
  31. package/hooks/useInterchainClient.js +38 -39
  32. package/hooks/useOfflineSigner.d.ts +4 -0
  33. package/hooks/useOfflineSigner.js +19 -0
  34. package/hooks/useWalletManager.js +1 -1
  35. package/modal/modal.js +40 -11
  36. package/modal/provider.js +1 -2
  37. package/modal/views/Astronaut.d.ts +2 -0
  38. package/modal/views/Astronaut.js +8 -0
  39. package/modal/views/Connected.d.ts +4 -0
  40. package/modal/views/Connected.js +37 -0
  41. package/modal/views/Connecting.d.ts +4 -0
  42. package/modal/views/Connecting.js +38 -0
  43. package/modal/views/QRCode.d.ts +2 -0
  44. package/modal/views/QRCode.js +20 -0
  45. package/modal/views/Reject.d.ts +4 -0
  46. package/modal/views/Reject.js +21 -0
  47. package/modal/views/WalletList.d.ts +2 -0
  48. package/modal/views/WalletList.js +37 -0
  49. package/modal/views/index.d.ts +5 -0
  50. package/modal/views/index.js +21 -0
  51. package/package.json +7 -3
  52. package/provider.d.ts +6 -6
  53. package/provider.js +8 -8
  54. package/types/chain.d.ts +18 -9
  55. package/utils/index.d.ts +7 -0
  56. package/utils/index.js +11 -0
  57. package/utils/wallet.d.ts +1 -0
  58. package/utils/wallet.js +17 -0
package/README.md CHANGED
@@ -1,22 +1,137 @@
1
- # react
2
-
3
1
  <p align="center">
4
2
  <img src="https://user-images.githubusercontent.com/545047/188804067-28e67e5e-0214-4449-ab04-2e0c564a6885.svg" width="80"><br />
5
- interchain-kit wallet connector react package
3
+ @interchain-kit/react
6
4
  </p>
7
5
 
8
- ## install
9
-
6
+ ## Install
7
+ Using npm:
8
+ ```sh
9
+ npm install @interchain-kit/react
10
+ ```
11
+ Using yarn:
10
12
  ```sh
11
- npm install react
13
+ yarn add @interchain-kit/react
14
+ ```
15
+
16
+ ## Usage
17
+ ### Setup
18
+ ```js
19
+ import { ChainProvider, useChain } from "@interchain-kit/react";
20
+ import { assetLists, chains } from "@chain-registry/v2";
21
+ import { keplrWallet } from "@interchain-kit/keplr-extension";
22
+ import { ThemeProvider } from "@interchain-ui/react";
23
+ import "@interchain-ui/react/styles";
24
+
25
+ const chainName = 'cosmoshub'
26
+
27
+ const Show = () => {
28
+ const {address} = useChain(chainName);
29
+ // will show cosmoshub address from what you selected wallet in modal
30
+ return <div>{address}</div>;
31
+ };
32
+
33
+ function App() {
34
+ return (
35
+ <ThemeProvider>
36
+ <ChainProvider
37
+ chains={chains.filter((c) => c.chainName === chainName)}
38
+ assetLists={assetLists.filter((c) => c.chainName === chainName)}
39
+ wallets={[keplrWallet]}
40
+ signerOptions={{}}
41
+ endpointOptions={{}}
42
+ >
43
+ <Show />
44
+ </ChainProvider>
45
+ </ThemeProvider>
46
+ );
47
+ }
48
+
49
+ export default App;
50
+ ```
51
+
52
+ ### useChain
53
+ ```js
54
+
55
+ const chainName = 'cosmoshub'
56
+ const { chain, assetList, address, wallet, queryClient, signingClient } = useChain(chainName)
57
+
58
+ console.log(wallet) //keprl extension wallet info
59
+ console.log(chain) // chain info for cosmoshub
60
+ console.log(assetList) // assets info for cosmoshub
61
+ console.log(address) // address for cosmoshub in keplr-extension wallet
62
+
63
+ //query
64
+ const { balance } = await queryClient.balance({
65
+ address,
66
+ denom: 'uosmo'
67
+ })
68
+ console.log(balance)
69
+ // { amount: 23423, denom: 'uosmos' }
70
+
71
+ ```
72
+
73
+ ## useChainWallet
74
+ ```js
75
+ import { keplrWallet } from "@interchain-kit/keplr-extension";
76
+ import { leapWallet } from "@interchain-kit/leap-extension";
77
+
78
+ const Show = () => {
79
+ const juno = useChainWallet('juno', 'keplr-extension')
80
+ const stargaze = useChainWallet('stargaze', 'leap-extension')
81
+ console.log(juno.address) // juno1xxxxxxx in keplr extension wallet
82
+ console.log(stargaze.addresss) // stargaze1xxxxxx in leap extension wallet
83
+ };
84
+
85
+ const chainNames
86
+
87
+ function App() {
88
+ return (
89
+ <ThemeProvider>
90
+ <ChainProvider
91
+ chains={chains.filter((c) => c.chainName === chainName)}
92
+ assetLists={assetLists.filter((c) => c.chainName === chainName)}
93
+ wallets={[keplrWallet, leapWallet]}
94
+ signerOptions={{}}
95
+ endpointOptions={{}}
96
+ >
97
+ <Show />
98
+ </ChainProvider>
99
+ </ThemeProvider>
100
+ );
101
+ }
102
+
103
+ export default App;
104
+ ```
105
+
106
+ ### useActiveWallet
107
+ ```js
108
+ const wallet = useActiveWallet()
109
+
110
+ console.log(wallet) // current connected wallet
111
+
112
+ ```
113
+
114
+ ### useAccount
115
+ ```js
116
+ const account = useAccount('cosmoshub', 'keplr-extension')
117
+
118
+ console.log(account.address) // cosmoshub address in keplr-extension wallet
119
+
120
+ ```
121
+
122
+ ### useOfflineSigner
123
+ ```js
124
+ const offlineSigner = useOfflineSigner('cosmoshub', 'keplr-extension')
125
+
126
+ console.log(offlineSigner) // cosmoshub offlineSigner in keplr-extension wallet
127
+ ```
128
+
129
+ ### useChains
130
+
131
+ ```js
132
+ WIP
12
133
  ```
13
- ## Table of contents
14
134
 
15
- - [react](#react)
16
- - [Install](#install)
17
- - [Table of contents](#table-of-contents)
18
- - [Developing](#developing)
19
- - [Credits](#credits)
20
135
 
21
136
  ## Developing
22
137
 
@@ -4,3 +4,4 @@ export * from './useAccount';
4
4
  export * from './useChain';
5
5
  export * from './useConnect';
6
6
  export * from './useChainWallet';
7
+ export * from './useConfig';
@@ -1,4 +1,5 @@
1
1
  import { useEffect, useState } from "react";
2
+ import { WalletState } from "@interChain-kit/core";
2
3
  import { useWalletManager } from './useWalletManager';
3
4
  export const useAccount = (chainName, walletName) => {
4
5
  const walletManager = useWalletManager();
@@ -6,8 +7,15 @@ export const useAccount = (chainName, walletName) => {
6
7
  const [account, setAccount] = useState(null);
7
8
  const chain = walletManager.chains.find(c => c.chainName === chainName);
8
9
  const getAccount = async () => {
9
- const account = await wallet.getAccount(chain.chainId);
10
- setAccount(account);
10
+ if (wallet && chain) {
11
+ if (wallet.walletState === WalletState.Connected) {
12
+ const account = await wallet.getAccount(chain.chainId);
13
+ setAccount(account);
14
+ }
15
+ if (wallet.walletState === WalletState.Disconnected) {
16
+ setAccount(null);
17
+ }
18
+ }
11
19
  };
12
20
  useEffect(() => {
13
21
  if (wallet) {
@@ -15,10 +23,6 @@ export const useAccount = (chainName, walletName) => {
15
23
  }
16
24
  }, [wallet]);
17
25
  useEffect(() => {
18
- if (!wallet) {
19
- setAccount(null);
20
- return;
21
- }
22
26
  getAccount();
23
27
  }, [wallet, chainName, wallet?.walletState]);
24
28
  return account;
@@ -1,5 +1,13 @@
1
+ import { useEffect } from "react";
1
2
  import { useWalletManager } from "./useWalletManager";
3
+ import { useWalletModal } from "../modal";
2
4
  export const useActiveWallet = () => {
3
5
  const walletManager = useWalletManager();
6
+ const { open } = useWalletModal();
7
+ useEffect(() => {
8
+ if (!walletManager.activeWalletName) {
9
+ open();
10
+ }
11
+ }, [walletManager.activeWalletName]);
4
12
  return walletManager.getActiveWallet();
5
13
  };
@@ -2,18 +2,41 @@ import { useWalletManager } from "./useWalletManager";
2
2
  import { useAccount } from "./useAccount";
3
3
  import { useActiveWallet } from './useActiveWallet';
4
4
  import { useInterchainClient } from './useInterchainClient';
5
+ import { useWalletModal } from "../modal";
6
+ import { ChainNameNotExist } from "@interChain-kit/core";
5
7
  export const useChain = (chainName) => {
6
8
  const walletManager = useWalletManager();
7
9
  const chainToShow = walletManager.chains.find((c) => c.chainName === chainName);
8
10
  const assetList = walletManager.assetLists.find((a) => a.chainName === chainName);
9
11
  const activeWallet = useActiveWallet();
10
- const account = useAccount(chainName, activeWallet.option.name);
11
- const interchainClient = useInterchainClient(chainName, activeWallet.option.name);
12
+ const account = useAccount(chainName, activeWallet?.option?.name);
13
+ const interchainClient = useInterchainClient(chainName, activeWallet?.option?.name);
14
+ if (!chainToShow) {
15
+ throw new ChainNameNotExist(chainName);
16
+ }
17
+ const { open, close } = useWalletModal();
18
+ const cosmosKitUserChainReturnType = {
19
+ connect: () => {
20
+ if (activeWallet) {
21
+ return;
22
+ }
23
+ open();
24
+ },
25
+ openView: open,
26
+ closeView: close,
27
+ getRpcEndpoint: () => walletManager.getRpcEndpoint(activeWallet, chainName),
28
+ status: activeWallet?.walletState,
29
+ username: account?.username,
30
+ message: activeWallet?.errorMessage,
31
+ getSigningCosmWasmClient: () => walletManager.getSigningCosmwasmClient(activeWallet.option.name, chainName),
32
+ getSigningCosmosClient: () => walletManager.getSigningCosmosClient(activeWallet.option.name, chainName),
33
+ };
12
34
  return {
13
35
  chain: chainToShow,
14
36
  assetList,
15
37
  address: account?.address,
16
38
  wallet: activeWallet,
39
+ ...cosmosKitUserChainReturnType, //for migration cosmos kit
17
40
  ...interchainClient
18
41
  };
19
42
  };
@@ -0,0 +1,10 @@
1
+ import { useWalletManager } from "./useWalletManager";
2
+ export const useConfig = () => {
3
+ const walletManager = useWalletManager();
4
+ return {
5
+ updateChains: (chains) => walletManager.chains = chains,
6
+ updateAssetLists: (assetLists) => walletManager.assetLists = assetLists,
7
+ updateSignerOptions: (signerOptions) => walletManager.signerOptions = signerOptions,
8
+ updateEndpoints: (endpointOptions) => walletManager.endpointOptions = endpointOptions,
9
+ };
10
+ };
@@ -1,59 +1,58 @@
1
1
  import { useEffect, useState } from "react";
2
2
  import { useWalletManager } from './useWalletManager';
3
3
  import { useAccount } from './useAccount';
4
+ import { WalletState } from '@interChain-kit/core';
4
5
  export const useInterchainClient = (chainName, walletName) => {
5
6
  const [rpcEndpoint, setRpcEndpoint] = useState();
7
+ //query
8
+ const [queryClient, setQueryClient] = useState(null);
9
+ //signing
6
10
  const [signingClient, setSigningClient] = useState(null);
7
- const [client, setClient] = useState(null);
8
- const [stargateSigningClient, setStargateSigningClient] = useState(null);
9
- const [stargateClient, setStargateClient] = useState();
10
- const [cosmWasmSigningClient, setCosmWasmSigningClient] = useState(null);
11
+ const [signingCosmosClient, setSigningCosmosClient] = useState(null);
12
+ const [signingCosmWasmClient, setSigningCosmWasmClient] = useState(null);
13
+ const [signingInjectiveClient, setSigningInjectiveClient] = useState(null);
11
14
  const [error, setError] = useState(null);
12
15
  const [isLoading, setIsLoading] = useState(false);
13
16
  const walletManager = useWalletManager();
14
17
  const account = useAccount(chainName, walletName);
18
+ const wallet = walletManager.wallets.find((w) => w.option.name === walletName);
19
+ const chainToShow = walletManager.chains.find((c) => c.chainName === chainName);
15
20
  const initialize = async () => {
16
- const wallet = walletManager.wallets.find((w) => w.option.name === walletName);
17
- const chainToShow = walletManager.chains.find((c) => c.chainName === chainName);
18
- if (!wallet) {
19
- throw new Error('Wallet not found');
20
- }
21
- if (!chainToShow) {
22
- throw new Error('Chain not found');
23
- }
24
- try {
25
- setIsLoading(true);
26
- const rpcEndpoint = await walletManager.getRpcEndpoint(wallet, chainName);
27
- setRpcEndpoint(rpcEndpoint);
28
- const clientFactory = await walletManager.createClientFactory(wallet, chainName);
29
- const client = await clientFactory.getClient();
30
- setClient(client);
31
- const signingClient = await clientFactory.getSigningClient();
32
- setSigningClient(signingClient);
33
- const stargateClient = await clientFactory.getStargateClient();
34
- setStargateClient(stargateClient);
35
- const signingStargateClient = await clientFactory.getSigningStargateClient(chainToShow.bech32Prefix);
36
- setStargateSigningClient(signingStargateClient);
37
- const signingCosmwasmClient = await clientFactory.getSigningCosmwasmClient();
38
- setCosmWasmSigningClient(signingCosmwasmClient);
39
- }
40
- catch (error) {
41
- setError(error);
42
- }
43
- finally {
44
- setIsLoading(false);
21
+ if (wallet && chainToShow && wallet?.walletState === WalletState.Connected) {
22
+ try {
23
+ setIsLoading(true);
24
+ const rpcEndpoint = await walletManager.getRpcEndpoint(wallet, chainName);
25
+ setRpcEndpoint(rpcEndpoint);
26
+ const queryClient = await walletManager.getQueryClient(walletName, chainName);
27
+ setQueryClient(queryClient);
28
+ const signingClient = await walletManager.getSigningClient(walletName, chainName);
29
+ setSigningClient(signingClient);
30
+ const signingStargateClient = await walletManager.getSigningCosmosClient(walletName, chainName);
31
+ setSigningCosmosClient(signingStargateClient);
32
+ const signingCosmwasmClient = await walletManager.getSigningCosmwasmClient(walletName, chainName);
33
+ setSigningCosmWasmClient(signingCosmwasmClient);
34
+ const signingInjectiveClient = await walletManager.getSigningInjectiveClient(walletName, chainName);
35
+ setSigningInjectiveClient(signingInjectiveClient);
36
+ }
37
+ catch (error) {
38
+ setError(error);
39
+ console.log("create client error", error);
40
+ }
41
+ finally {
42
+ setIsLoading(false);
43
+ }
45
44
  }
46
45
  };
47
46
  useEffect(() => {
48
47
  initialize();
49
- }, [chainName, walletName, account?.address]);
48
+ }, [chainName, walletName, account, wallet?.walletState]);
50
49
  return {
51
50
  rpcEndpoint,
52
- signingClient,
53
- client,
54
- stargateSigningClient,
55
- stargateClient,
56
- cosmWasmSigningClient,
51
+ signingClient: chainName === 'injective' ? signingInjectiveClient : signingClient,
52
+ queryClient,
53
+ signingCosmosClient,
54
+ signingCosmWasmClient,
55
+ signingInjectiveClient,
57
56
  error,
58
57
  isLoading
59
58
  };
@@ -0,0 +1,15 @@
1
+ import { useEffect, useState } from "react";
2
+ import { useWalletManager } from "./useWalletManager";
3
+ export const useOfflineSigner = (chainName, walletName) => {
4
+ const walletManager = useWalletManager();
5
+ const wallet = walletManager.wallets.find((w) => w.option.name === walletName);
6
+ const [offlineSigner, setOfflineSigner] = useState(null);
7
+ useEffect(() => {
8
+ if (wallet && chainName) {
9
+ setOfflineSigner(walletManager.getOfflineSigner(wallet, chainName));
10
+ }
11
+ }, [wallet, chainName]);
12
+ return {
13
+ offlineSigner
14
+ };
15
+ };
@@ -1,5 +1,5 @@
1
- import { useInterChainWalletContext } from "../provider";
1
+ import { useInterchainWalletContext } from "../provider";
2
2
  export const useWalletManager = () => {
3
- const { walletManager } = useInterChainWalletContext();
3
+ const { walletManager } = useInterchainWalletContext();
4
4
  return walletManager;
5
5
  };
@@ -1,16 +1,45 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useWalletManager } from "../hooks";
3
- const style = {
4
- position: 'absolute',
5
- top: '50%',
6
- left: '50%',
7
- transform: 'translate(-50%,-50%)',
8
- width: '500px',
9
- backgroundColor: 'white',
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ConnectModal } from "@interchain-ui/react";
3
+ import { ConnectedContent, ConnectedHeader, ConnectingContent, ConnectingHeader, QRCodeContent, QRCodeHeader, RejectContent, RejectHeader, WalletListContent, WalletListHeader, } from "./views";
4
+ import { useWalletModal } from "./provider";
5
+ import { useActiveWallet } from "../hooks";
6
+ import { useEffect, useState } from "react";
7
+ import { WalletState } from "@interChain-kit/core";
8
+ const defaultModalView = {
9
+ header: _jsx(WalletListHeader, {}),
10
+ content: _jsx(WalletListContent, {}),
10
11
  };
11
12
  export const WalletModal = () => {
12
- const walletManager = useWalletManager();
13
- return (_jsx("ul", { style: style, children: walletManager.wallets.map(wallet => {
14
- return (_jsxs("li", { children: [_jsx("span", { children: wallet.option.prettyName }), _jsx("button", { onClick: () => walletManager.connect(wallet.option.name), children: "connect" })] }));
15
- }) }));
13
+ const { modalIsOpen, open, close } = useWalletModal();
14
+ const activeWallet = useActiveWallet();
15
+ const [modalView, setModalView] = useState(defaultModalView);
16
+ const gotoWalletList = () => setModalView(defaultModalView);
17
+ useEffect(() => {
18
+ switch (true) {
19
+ case activeWallet?.option?.mode === "wallet-connect":
20
+ setModalView({ header: _jsx(QRCodeHeader, {}), content: _jsx(QRCodeContent, {}) });
21
+ break;
22
+ case activeWallet?.walletState === WalletState.Connecting:
23
+ setModalView({
24
+ header: _jsx(ConnectingHeader, { onBack: gotoWalletList }),
25
+ content: _jsx(ConnectingContent, {}),
26
+ });
27
+ break;
28
+ case activeWallet?.walletState === WalletState.Connected:
29
+ setModalView({
30
+ header: _jsx(ConnectedHeader, { onBack: gotoWalletList }),
31
+ content: _jsx(ConnectedContent, {}),
32
+ });
33
+ break;
34
+ case activeWallet?.walletState === WalletState.Reject:
35
+ setModalView({
36
+ header: _jsx(RejectHeader, { onBack: gotoWalletList }),
37
+ content: _jsx(RejectContent, {}),
38
+ });
39
+ break;
40
+ default:
41
+ setModalView(defaultModalView);
42
+ }
43
+ }, [activeWallet, activeWallet?.walletState]);
44
+ return (_jsx(ConnectModal, { isOpen: modalIsOpen, header: modalView.header, onOpen: open, onClose: close, children: modalView.content }));
16
45
  };
@@ -1,13 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createContext, useContext, useState } from "react";
3
- import { createPortal } from "react-dom";
4
3
  import { WalletModal } from "./modal";
5
4
  const WalletModalContext = createContext(null);
6
5
  export const WalletModalProvider = ({ children }) => {
7
6
  const [modalIsOpen, setModalIsOpen] = useState(false);
8
7
  const open = () => setModalIsOpen(true);
9
8
  const close = () => setModalIsOpen(false);
10
- return (_jsxs(WalletModalContext.Provider, { value: { modalIsOpen, open, close }, children: [children, modalIsOpen && createPortal(_jsx(WalletModal, {}), document.body)] }));
9
+ return (_jsxs(WalletModalContext.Provider, { value: { modalIsOpen, open, close }, children: [children, _jsx(WalletModal, {})] }));
11
10
  };
12
11
  export const useWalletModal = () => {
13
12
  const context = useContext(WalletModalContext);
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function AstronautSvg(props) {
3
+ return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", className: "chakra-icon css-1plqj06", viewBox: "0 0 278 255", ...props, children: [_jsx("path", { fill: "#030609", d: "M136.844 254.8c70.527 0 127.7-57.039 127.7-127.4S207.371 0 136.844 0 9.144 57.039 9.144 127.4s57.173 127.4 127.7 127.4Z" }), _jsx("path", { fill: "#F6F5F3", d: "M85.444 22.2a2.9 2.9 0 1 0 0-5.8 2.9 2.9 0 0 0 0 5.8Zm122.7 19.9a2.9 2.9 0 1 0 0-5.801 2.9 2.9 0 0 0 0 5.8Zm18.5 68.5a2.9 2.9 0 1 0-.002-5.802 2.9 2.9 0 0 0 .002 5.802Zm-15.6 71.5a2.9 2.9 0 1 0-.002-5.802 2.9 2.9 0 0 0 .002 5.802Zm-8.8 36a2.9 2.9 0 1 0-.002-5.802 2.9 2.9 0 0 0 .002 5.802Zm-57.5 12.2a2.9 2.9 0 1 0-.002-5.802 2.9 2.9 0 0 0 .002 5.802Zm-32.9-24.2a2.9 2.9 0 1 0-.002-5.802 2.9 2.9 0 0 0 .002 5.802Zm-97.7-94a2.9 2.9 0 1 0-.001-5.8 2.9 2.9 0 0 0 0 5.8Zm34-62.1a2.9 2.9 0 1 0 0-5.8 2.9 2.9 0 0 0 0 5.8Z" }), _jsx("path", { fill: "#BA536A", d: "M235.944 47.1c9.6 11.7 17 25.1 22 39.7-4.5 4.5-10.7 7.4-17.6 7.4-13.4 0-24.2-10.7-24.2-23.8 0-11.6 8.5-21.3 19.8-23.3Z" }), _jsx("path", { fill: "#FF6B84", d: "M242.544 92.9c-13 0-23.6-10.6-23.6-23.7 0-10.6 7-19.6 16.7-22.6 9.7 11.9 17.4 25.6 22.4 40.5-4.2 3.6-9.6 5.8-15.5 5.8Z" }), _jsx("path", { fill: "#124899", d: "M144.744 246.7c0 2.8-.6 5.4-1.5 7.9-2.067.133-4.2.2-6.4.2-14.2 0-28-2.4-40.8-6.7 0-.5-.1-1-.1-1.4 0-13.1 10.9-23.8 24.4-23.8 13.5 0 24.4 10.7 24.4 23.8Z" }), _jsx("path", { fill: "#4CBAB6", d: "M145.644 249.2c0 1.8-.2 3.567-.6 5.3-2.667.2-5.4.3-8.2.3-13.5 0-26.5-2.1-38.7-6 .2-13.4 10.8-24.3 23.7-24.3 13.1 0 23.8 11.1 23.8 24.7Z" }), _jsx("path", { fill: "#D8DEDC", d: "M205.144 117.7c5.9 6.3 17.1 16.7 27.6 23.5 21.8 13.9 20.8 11.7 26.1 14l-8.8 27.9c-13.334-9.733-24.167-17.033-32.5-21.9-10.2-6.067-21.8-12.033-34.8-17.9l22.4-25.6Z" }), _jsx("path", { fill: "#839091", d: "M207.344 119.9c.4.467 2.066 2.1 5 4.9-2.667 5.933-5.067 10.333-7.2 13.2-5 6.8-5.3 6.5-10 11.2l-7.9-3.8 20.1-25.5Z" }), _jsx("path", { fill: "#9CA9A8", d: "M242.844 196.2c-6.934 1.333-10.367.2-10.3-3.4 0-8.4 5.1-7.8 18.6-10.2l-8.3 13.6Z" }), _jsx("path", { fill: "#DAE0DF", d: "M234.844 190.9c-.267-1.6.466-3.067 2.2-4.4 1.666-1.267 4.933-1.933 9.8-2-4.534 1.4-7.334 2.533-8.4 3.4-1 .867-2.2 1.867-3.6 3Z" }), _jsx("path", { fill: "#030609", d: "M251.844 156.9c-4.134-6.6-4.734-10.433-1.8-11.5 4.5-1.6 11.2-1 16.1 1 6.2 2.5 11.7 6.9 11.7 10.5 0 3.133-2.6 5.233-7.8 6.3 3.866 4.6 4.866 7.933 3 10-1.8 2.067-5.267 2.8-10.4 2.2 5 5.133 6.333 8.767 4 10.9-2.6 2.3-12.1 1.6-18.1-.9-5.2-2.1-14.2-12.6-11.5-15.8 1.733-2.133 5.5-3.2 11.3-3.2-5.334-3.067-7-5.567-5-7.5 2-1.867 4.833-2.533 8.5-2Z" }), _jsx("path", { fill: "#9CA9A8", d: "M252.344 148.9c2.9-1.1 8.3.5 12.3 1.8 3.9 1.2 10.5 5.7 9 8-1 1.6-3.267 2.567-6.8 2.9 4.133 5.933 4.966 9.267 2.5 10-3.7 1-11.8.8-11.3 1.3s11.1 10.2 6.5 12.5c-4.5 2.3-10.9.8-15.7-1.8-5.7-3-10.4-10-8.5-12 .733-.8 4.466-1.7 11.2-2.7-5.334-4-7.8-6.533-7.4-7.6.7-1.7 3-2.6 6.4-2.6h6.5c-5.934-5.533-7.5-8.8-4.7-9.8Z" }), _jsx("path", { fill: "#DAE0DF", d: "M256.544 155.2c-3.134-2.733-4.134-4.333-3-4.8 1.066-.4 2.9-.3 5.5.3-1.6 0-2.6.3-3 .9-.4.6-.234 1.8.5 3.6Zm-7.7 6.2c-.534 1.2-.3 2.367.7 3.5-3.2-1.4-4.434-2.666-3.7-3.8.733-1.133 3.4-1.533 8-1.2-2.8-.2-4.467.3-5 1.5Zm-4.3 12.4c-.467 1.067-.167 2.867.9 5.4-3.334-2.933-4.367-5.133-3.1-6.6 1.266-1.533 3.433-2.133 6.5-1.8-2.467.867-3.9 1.867-4.3 3Z" }), _jsx("path", { fill: "#D8DEDC", d: "M180.844 148.9c1.933 5.933 3.933 13.767 6 23.5 3.7 17.5 2.9 36.9-4.1 39.9-2.8 1.2-5.4 3.6-16.1 0-7.2-2.4-22.134-12.133-44.8-29.2l59-34.2Z" }), _jsx("path", { fill: "#687476", d: "M182.744 155.2c-3.2 10.933-12.3 19.7-27.3 26.3-7.334 3.267-16.334 5.4-27 6.4l-10.2-7.5 46.5-25.2h18Z" }), _jsx("path", { fill: "#D8DEDC", d: "M74.044 99.2c-7.467.867-13.3 1.533-17.5 2-1.934.2-4.767 1.167-8.5 2.9-3.2-4.333-5.434-8.533-6.7-12.6-1.5-4.6-3-15.4.2-21.7 2.2-4.2 14.366-9.067 36.5-14.6l-4 44Z" }), _jsx("path", { fill: "#839091", d: "m82.544 53.7-3.5 43.9-23.9 3.9c-1-4.333-1.434-7.933-1.3-10.8.8-14.133 2.466-24.1 5-29.9l23.7-7.1Z" }), _jsx("path", { fill: "#030609", d: "m189.144 137.5-6.4 17.7c-12.4 14.067-26.967 23.533-43.7 28.4-16.8 4.867-34.934 5.467-54.4 1.8l-68.8-32.5c.733-5.933 2.766-11.667 6.1-17.2 5-8.3 15.9-29.3 28.5-33 8.4-2.533 17.6-3.7 27.6-3.5l111.1 38.3Z" }), _jsx("path", { fill: "#D8DEDC", d: "M174.844 148.9c-15.334 26-42.1 37.233-80.3 33.7-16.6-1.6-41.934-12.333-76-32.2 3.666-4.733 5.833-8.467 6.5-11.2 1.1-4 2.4-7.2 6.5-9.5 4.1-2.4 9-6.9 11.7-8.8 4.8-3.5 4.6-9.7 7.2-10.4 4.266-1 12.3-1.933 24.1-2.8l100.3 41.2Z" }), _jsx("path", { fill: "#687476", d: "M113.844 150.7h63.5c-4.334 6.133-11.3 12.2-20.9 18.2-9.6 6-16.4 9-20.4 9-3.334 0-8.6-2.067-15.8-6.2-9.6-5.533-15.734-10.467-18.4-14.8l12-6.2Z" }), _jsx("path", { fill: "#839091", d: "m79.844 106.3 14.8 30.1-20.1 6.9c-5.8-7.667-9.534-12.967-11.2-15.9-1.667-2.933-4.267-8.867-7.8-17.8l24.3-3.3Z" }), _jsx("path", { fill: "#030609", d: "M142.144 166.5c40.869 0 74-33.937 74-75.8s-33.131-75.8-74-75.8-74 33.937-74 75.8 33.131 75.8 74 75.8Z" }), _jsx("path", { fill: "#D8DEDC", d: "M143.444 158.8c37.334 0 67.6-31.027 67.6-69.3 0-38.273-30.266-69.3-67.6-69.3-37.335 0-67.6 31.027-67.6 69.3 0 38.273 30.265 69.3 67.6 69.3Z" }), _jsx("path", { fill: "#fff", d: "M172.344 29.4c9.066 4.133 15.9 10.033 20.5 17.7-.534 1.933-7.367 4.033-20.5 6.3-4.667.8-8.934 1.4-12.8 1.8.066-5.467-.5-10.667-1.7-15.6-1.867-7.467-3.867-12.034-6-13.7 6.6-.867 13.433.3 20.5 3.5Z" }), _jsx("path", { fill: "#030609", d: "M85.444 50c23.133 6.6 44.366 9.566 63.7 8.9 19.333-.667 37.033-3.634 53.1-8.9 6.533 14.4 10.433 25.266 11.7 32.6 1.266 7.333.3 16.633-2.9 27.9-16.334 16.666-38.9 24.3-67.7 22.9-35.8-1.734-58.633-11.267-68.5-28.6-2.6-15.467-2.7-27.134-.3-35 2.4-7.934 6.033-14.534 10.9-19.8Z" }), _jsx("path", { fill: "#173D3E", d: "M96.744 75.6c5.7 1.4 15.8-.4 20.1 1.3 4.2 1.8 11.7 12.8 16.3 14.4 4.6 1.5 11.7-5.4 14-5 2.3.3 1.9 4.4 4.9 6.6 1.2.9 3.2 1.9 7.3 3 3.066.866 6.233 1.866 9.5 3-20.334 11.666-40.3 15.533-59.9 11.6-19.6-3.867-30.067-8.267-31.4-13.2-.467-4.667-.3-10.367.5-17.1.666-5.134 1.7-9.567 3.1-13.3 6.666 4.866 11.866 7.766 15.6 8.7Z" }), _jsx("path", { fill: "#276A69", d: "M77.344 91.7c2.733-.6 5.166-.2 7.3 1.2 3.1 2.1 14.7 9.3 18.7 10.8s24.9-.2 26.8-1.5c1.2-.934 3.1-1.7 5.7-2.3 3.333 2.733 5.933 4 7.8 3.8 2.7-.4 6 1.2 9.9-1.3 4-2.5 6-5.6 8.8-5.6 2.7 0 5.9 1.8 8 2.1 6.5 1.1 8.2-1.5 11-.5 2.8 1 4.2 1.5 8.8 1.3 3.066-.2 9.033-.834 17.9-1.9 1.6 4.466-3.534 11.333-15.4 20.6-6.3 4.9-19.3 12-55 12-5.8 0-27.9-1.1-46-14.5-11.4-8.334-16.167-16.4-14.3-24.2Z" }), _jsx("path", { fill: "#388688", d: "M122.844 103.5c4.466-.467 8.566-2.434 12.3-5.9l1.7 2.7c.133 2.266-.767 4.266-2.7 6-2.9 2.6-7.3 4.6-12.3 4.2-3.267-.2-7.934-2.334-14-6.4 5.4.133 10.4-.067 15-.6Zm27.8-.9c3.6-.6 6.7-2.7 9.2-5 1.666-1.534 3.9-1.534 6.7 0-1 .733-2 1.433-3 2.1-1.4 1-2.6 1.1-5.2 2.2s-6.6 4.4-13.8 4.4c-3 0-5.134-1.6-6.4-4.8 4.266 1.466 8.4 1.833 12.4 1.1h.1Z" }), _jsx("path", { fill: "#fff", d: "m159.344 60.9 20-2.5c4.2 14.266 4.833 36.333 1.9 66.2-4.067 1.266-7.634 2.3-10.7 3.1-4.6 1.2-8.934 1.866-13 2 2.533-7.667 3.633-19.5 3.3-35.5-.2-11.867-.7-22.967-1.5-33.3Zm40-6c2.4 2.7 7.5 10.9 8.8 20 1.9 14.4 1.3 21.5-.6 27.8-2.134 4-4.634 7.1-7.5 9.3-2.867 2.266-5.434 4.466-7.7 6.6 3.2-5.067 4.466-14.734 3.8-29-.667-15.134-2.534-26.134-5.6-33l8.8-1.7Z", opacity: 0.4 }), _jsx("path", { fill: "#030609", d: "M74.544 142.9c15.733-15.333 28.166-21.9 37.3-19.7 15.3 3.6 14.9 13.9 11.4 24.4-2.334 6.933-15.2 12.7-38.6 17.3l-10.1-22Z" }), _jsx("path", { fill: "#9CA9A8", d: "M78.144 146.2c4-4.667 11.233-8.5 21.7-11.5 15.8-4.5 18.3 4.3 18.4 7.2.2 3-1.4 7.2-6.4 8.8-3.334 1.067-11.567 3.8-24.7 8.2l-9-12.7Z" }), _jsx("path", { fill: "#515C5C", d: "m78.144 144.9 4.2-2.3c3.933 4.6 6.6 6.867 8 6.8 4.2-.1 9.3.4 9.5-.5.2-.6.866-2.7 2-6.3-.134 2.8-.134 4.5 0 5.1.2.9 9.1-.2 11.3-1.3 2-1 3.7-2.5 5.1-4.5.2 3.2-.534 5.367-2.2 6.5-3.6 2.6-13.234 6.1-28.9 10.5l-9-14Z" }), _jsx("path", { fill: "#DAE0DF", d: "M105.144 136.1c1-.3 6.2-.7 7.7 0 1 .467 1.633 1.5 1.9 3.1-.8-.733-1.767-1.433-2.9-2.1-.934-.533-3.167-.867-6.7-1Zm-4.5 7.8-1.5 4.2c-.267.867-2.367 1.067-6.3.6 2.466-.2 4.233-.8 5.3-1.8 1.133-.933 1.966-1.933 2.5-3Z" }), _jsx("path", { fill: "#030609", d: "M57.844 227.4c-.1 2.8 0 7.5-3.3 9.3-3.2 1.7-31 3.2-36.5-2.8-5.4-6-15.4-25.5-17.2-36.5-1.2-7.3-2-20.5 4-22.2 4-1.2 8.066-.833 12.2 1.1-3.934-5.933-5.9-11.4-5.9-16.4 0-3.6 1.3-9.5 5.9-10.5 3.066-.667 9.333-.167 18.8 1.5-2-7.2-2-12.2 0-15 6-8.5 22.5-7.2 27-6 4.5 1.3 39.8 37 42 46.4 1.4 5.7-2.3 21.4-6.7 24-1.867 1.133-6.1 2.1-12.7 2.9 4.2 8 4.2 13.4 0 16.2-4.267 2.867-13.467 2.867-27.6 0v8Z" }), _jsx("path", { fill: "#9CA9A8", d: "M38.844 152.9c-1.2-6.867-.7-11.034 1.5-12.5 3.2-2.3 12-2.7 16.5-2.2s5.1 8 11.5 12.2c11 7.3 24 25.3 25.5 28.8s.3 6 0 8.5-12.5 6.6-16 3.7c-1.4-1.1-7.2-8.4-12-12.2-4.667-3.8-9.1-6.567-13.3-8.3 7 7.8 10.933 12.566 11.8 14.3 1.3 2.6 4.1 10.2 7 12.2 2.9 2 10.1 7.8 11.2 8.6 1.1.9 1.6 8.9 1.1 10.4-1.8 2-15.3-4.6-17.3-5-2-.3-7.2-1.2-11.7-2.5-3.067-.8-10.5-7.8-22.3-21 2.733 8.866 5.333 14.9 7.8 18.1 3.6 4.8 6 12 9.2 12 4.5 0 3.8 9.2 1.7 10.9-2.2 1.8-18.3 1.4-24.7-1.5-4.7-2.1-24.5-46.5-19-48.2 7-2.3 11.8-1 14.2 1.3 1.533 1.533 3.133 3.1 4.8 4.7-6.867-19.067-8.367-28.834-4.5-29.3 4.466-.534 9.4-.934 14.8-1.2l1.5 4.7.5-4.2 3.2 1-3-3.3Z" }), _jsx("path", { fill: "#515C5C", d: "M12.244 178.1c-2 2.533-2.367 5.566-1.1 9.1 2 5.2 5.4 15 7.7 18.8 2.3 3.9 9.2 16.4 10.8 18.5 1 1.466 2.4 3.066 4.2 4.8-2.867-.267-5.367-.9-7.5-1.9-4.1-1.8-16.2-25.1-19-38.5-1.3-6.3-1.5-8.9 0-9.7 2.533-1.334 4.166-1.7 4.9-1.1Zm21.6 51.2c4.666-3 7.6-5.134 8.8-6.4a99.173 99.173 0 0 1 5.2-5.4c2.666.266 4.333.9 5 1.9 1 1.5-.4 8.9-1.8 9.5-2.4 1.1-5.1 1.3-6.9 1.4-3.867.133-7.3-.2-10.3-1Zm1.4-33c.9 3 3.7 7.6 6.1 11.6 2.533 4.266 4.233 7.033 5.1 8.3-8.2-7-12.9-12.667-14.1-17-1.2-4.334-1.2-8.1 0-11.3.533.533 1.5 3.333 2.9 8.4Zm47.3 9.7c1.6 2.9 2.3 7.7 1 10.4-.8 1.866-6.534.2-17.2-5 1.6-1.334 3-3.134 4.2-5.4 3.2-5.7 3.2-5.7 3.5-6.6 4.533 2.533 7.366 4.733 8.5 6.6Zm-20-23.4c2.533 3.533 5.033 8.066 7.5 13.6-6.334-4-11-8.534-14-13.6-2.334-4.067-4-8.634-5-13.7 5.733 6.466 9.566 11.033 11.5 13.7Zm12 5.3c3.2-.734 6.433-2.034 9.7-3.9 4.266-2.4 7.266-4.4 9-6 1.8 2.666 2 5.9.6 9.7-1.4 3.5-11.3 7.2-16 3.7-2-1.467-3.1-2.634-3.3-3.5Z" }), _jsx("path", { fill: "#DAE0DF", d: "M43.344 150.7c-.867-6.6.733-10.367 4.8-11.3 4-.867 8.133.566 12.4 4.3-4.534-1.2-7.9-1.634-10.1-1.3-2.134.333-4.5 3.1-7.1 8.3Zm-17.5 11c-.667 2-.334 7.833 1 17.5-5.2-12.4-6.467-19.4-3.8-21 3.2-1.934 6.8-1.934 10.8 0-4.667.333-7.334 1.5-8 3.5Zm-10.2 20.3c-1.134.533-2 2.5-2.6 5.9-1.667-5.8-1.334-8.7 1-8.7 3.666-.067 6.3 1.533 7.9 4.8-2.134-2.334-4.267-3-6.4-2h.1Z" })] }));
4
+ }
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ConnectModalHead, ConnectModalStatus } from "@interchain-ui/react";
3
+ import { useAccount, useActiveWallet, useWalletManager } from "../../hooks";
4
+ import { useWalletModal } from "../provider";
5
+ import { getWalletInfo } from "../../utils";
6
+ import { AstronautSvg } from "./Astronaut";
7
+ export const ConnectedHeader = ({ onBack }) => {
8
+ const activeWallet = useActiveWallet();
9
+ const { close } = useWalletModal();
10
+ return (_jsx(ConnectModalHead, { title: activeWallet?.option?.prettyName || '', hasBackButton: true, onClose: close, onBack: onBack, closeButtonProps: { onClick: close } }));
11
+ };
12
+ export const ConnectedContent = () => {
13
+ const activeWallet = useActiveWallet();
14
+ const walletManager = useWalletManager();
15
+ const account = useAccount(walletManager.chains[0].chainName, activeWallet?.option?.name);
16
+ const { close } = useWalletModal();
17
+ if (!activeWallet) {
18
+ return null;
19
+ }
20
+ return (_jsx(ConnectModalStatus, { wallet: getWalletInfo(activeWallet), status: 'Connected', connectedInfo: {
21
+ name: account?.username || 'Wallet',
22
+ avatar: (_jsx(AstronautSvg, { style: {
23
+ fontSize: 'inherit',
24
+ width: '100%',
25
+ height: '100%',
26
+ } })),
27
+ address: account?.address,
28
+ }, onDisconnect: async () => {
29
+ await walletManager.disconnect(activeWallet?.option?.name);
30
+ close();
31
+ } }));
32
+ };
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ConnectModalHead, ConnectModalStatus } from '@interchain-ui/react';
3
+ import { useActiveWallet, useWalletManager } from '../../hooks';
4
+ import { useWalletModal } from '../provider';
5
+ export const ConnectingHeader = ({ onBack }) => {
6
+ const wallet = useActiveWallet();
7
+ const { close } = useWalletModal();
8
+ const walletManager = useWalletManager();
9
+ if (!wallet)
10
+ return null;
11
+ return (_jsx(ConnectModalHead, { title: wallet.option.prettyName, hasBackButton: true, onClose: close, onBack: onBack, closeButtonProps: {
12
+ onClick: async () => {
13
+ await walletManager.disconnect(wallet.option.name);
14
+ close();
15
+ }
16
+ } }));
17
+ };
18
+ export const ConnectingContent = () => {
19
+ const activeWallet = useActiveWallet();
20
+ const { option: { prettyName, mode } } = activeWallet;
21
+ let title = 'Requesting Connection';
22
+ let desc = mode === 'wallet-connect'
23
+ ? `Approve ${prettyName} connection request on your mobile.`
24
+ : `Open the ${prettyName} browser extension to connect your wallet.`;
25
+ if (!activeWallet)
26
+ return null;
27
+ return (_jsx(ConnectModalStatus, { wallet: {
28
+ name: activeWallet.option.name,
29
+ prettyName: activeWallet.option.prettyName,
30
+ logo: activeWallet.option.logo,
31
+ mobileDisabled: true,
32
+ }, status: 'Connecting', contentHeader: title, contentDesc: desc }));
33
+ };
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ConnectModalHead, ConnectModalQRCode } from "@interchain-ui/react";
3
+ import { useActiveWallet, useWalletManager } from "../../hooks";
4
+ import { useWalletModal } from "../provider";
5
+ export const QRCodeHeader = () => {
6
+ const activeWallet = useActiveWallet();
7
+ const { close } = useWalletModal();
8
+ return (_jsx(ConnectModalHead, { title: activeWallet?.option?.prettyName || "", hasBackButton: true, onClose: () => void 0, onBack: () => void 0, closeButtonProps: { onClick: close } }));
9
+ };
10
+ export const QRCodeContent = () => {
11
+ const activeWallet = useActiveWallet();
12
+ const walletManager = useWalletManager();
13
+ const data = activeWallet.pairingUri;
14
+ return (_jsx(ConnectModalQRCode, { status: data ? "Done" : "Pending", link: data, description: "Open App to connect", errorTitle: "errorTitle", errorDesc: activeWallet.errorMessage || "", onRefresh: () => walletManager.connect(activeWallet?.option?.name || "") }));
15
+ };
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ConnectModalHead, ConnectModalStatus } from "@interchain-ui/react";
3
+ import { useWalletModal } from "../provider";
4
+ import { useActiveWallet, useWalletManager } from "../../hooks";
5
+ import { getWalletInfo } from "../../utils";
6
+ export const RejectHeader = ({ onBack }) => {
7
+ const { close } = useWalletModal();
8
+ const activeWallet = useActiveWallet();
9
+ return (_jsx(ConnectModalHead, { title: activeWallet.option.prettyName, hasBackButton: true, onClose: close, onBack: onBack, closeButtonProps: { onClick: close } }));
10
+ };
11
+ export const RejectContent = () => {
12
+ const activeWallet = useActiveWallet();
13
+ const walletManager = useWalletManager();
14
+ const { close } = useWalletModal();
15
+ return (_jsx(ConnectModalStatus, { status: "Rejected", wallet: getWalletInfo(activeWallet), contentHeader: 'Request Rejected', contentDesc: activeWallet.errorMessage || 'Connection permission is denied.', onConnect: () => walletManager.connect(activeWallet.option.name).then(close) }));
16
+ };
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ConnectModalHead, ConnectModalWalletList } from "@interchain-ui/react";
3
+ import { useWalletModal } from "../provider";
4
+ import { useWalletManager } from "../../hooks";
5
+ export const WalletListHeader = () => {
6
+ const { close } = useWalletModal();
7
+ return (_jsx(ConnectModalHead, { title: "Select your wallet", hasBackButton: false, onClose: close, closeButtonProps: { onClick: close } }));
8
+ };
9
+ export const WalletListContent = () => {
10
+ const walletManager = useWalletManager();
11
+ const { close } = useWalletModal();
12
+ const wallets = walletManager.wallets.map((w) => {
13
+ return ({
14
+ name: w.option.name,
15
+ prettyName: w.option.prettyName,
16
+ logo: w.option.logo,
17
+ mobileDisabled: true,
18
+ shape: 'list',
19
+ originalWallet: w
20
+ });
21
+ });
22
+ const onWalletClick = async (wallet) => {
23
+ try {
24
+ await walletManager.connect(wallet.option.name);
25
+ close();
26
+ }
27
+ catch (error) {
28
+ console.log(error);
29
+ }
30
+ };
31
+ return _jsx(ConnectModalWalletList, { wallets: wallets, onWalletItemClick: onWalletClick });
32
+ };
@@ -0,0 +1,5 @@
1
+ export * from './Connecting';
2
+ export * from './WalletList';
3
+ export * from './Connected';
4
+ export * from './Reject';
5
+ export * from './QRCode';