@xellar-protocol/indodax-kit 1.0.0

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.
@@ -0,0 +1,62 @@
1
+ import { Chain } from 'viem';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { Transport, CreateConfigParameters, Config } from 'wagmi';
4
+ import { Chain as Chain$1 } from 'wagmi/chains';
5
+ import React$1, { PropsWithChildren } from 'react';
6
+
7
+ interface ConnectButtonRendererProps {
8
+ children: (props: {
9
+ isConnected: boolean;
10
+ account?: {
11
+ address: `0x${string}`;
12
+ balanceDecimals?: number;
13
+ balanceFormatted?: string;
14
+ balanceSymbol?: string;
15
+ };
16
+ chain?: Chain;
17
+ disconnect: () => void;
18
+ openConnectModal: () => void;
19
+ openChainModal: () => void;
20
+ openProfileModal: () => void;
21
+ }) => React.ReactNode;
22
+ }
23
+
24
+ interface ConnectButtonProps {
25
+ className?: string;
26
+ }
27
+ declare function ConnectButton({ className }: ConnectButtonProps): react_jsx_runtime.JSX.Element;
28
+ declare namespace ConnectButton {
29
+ var Custom: ({ children }: ConnectButtonRendererProps) => react_jsx_runtime.JSX.Element;
30
+ }
31
+
32
+ type _chains = readonly [Chain$1, ...Chain$1[]];
33
+ type _transports = Record<_chains[number]['id'], Transport>;
34
+ interface GetDefaultConfigParameters<chains extends _chains, transports extends _transports> extends Omit<CreateConfigParameters<chains, transports>, 'client' | 'connectors' | 'chains'> {
35
+ appName: string;
36
+ appIcon?: string;
37
+ appDescription?: string;
38
+ appUrl?: string;
39
+ chains?: _chains;
40
+ walletConnectProjectId: string;
41
+ }
42
+ declare const defaultConfig: ({ appName, appIcon, appDescription, appUrl, walletConnectProjectId, ...wagmiParameters }: GetDefaultConfigParameters<_chains, _transports>) => Config;
43
+
44
+ declare const MODAL_TYPE: {
45
+ readonly CONNECT: "connect";
46
+ readonly CHAIN: "chain";
47
+ readonly PROFILE: "profile";
48
+ };
49
+ type ModalType = (typeof MODAL_TYPE)[keyof typeof MODAL_TYPE];
50
+
51
+ interface XellarKitContextType {
52
+ modalOpen: boolean;
53
+ openModal: (type: ModalType) => void;
54
+ closeModal: () => void;
55
+ theme: 'dark' | 'light';
56
+ walletConnectProjectId: string;
57
+ }
58
+ declare function IndodaxKitProvider({ children, theme }: PropsWithChildren<{
59
+ theme?: 'dark' | 'light';
60
+ }>): React$1.FunctionComponentElement<React$1.ProviderProps<XellarKitContextType>>;
61
+
62
+ export { ConnectButton, IndodaxKitProvider, defaultConfig };
package/dist/index.js ADDED
@@ -0,0 +1,328 @@
1
+ "use client"
2
+ import nn from"styled-components";var X=e=>`${e.slice(0,6)}...${e.slice(-4)}`;import Dt from"styled-components";var R=Dt.div`
3
+ background-color: ${({theme:e})=>e.colors.PRIMARY};
4
+ color: #fff;
5
+ padding: 10px 20px;
6
+ border-radius: 5px;
7
+ border: none;
8
+ cursor: pointer;
9
+ text-align: center;
10
+ `;R.defaultProps={role:"button"};var Oe=["k","m","b","t"];function K(e,n=1){return e.toString().replace(new RegExp(`(.+\\.\\d{${n}})\\d+`),"$1").replace(/(\.[1-9]*)0+$/,"$1").replace(/\.$/,"")}function Ve(e){if(e<1e-6)return e.toFixed(9).replace(/\.?0+$/,"");if(e<1)return K(e,3);if(e<10**2)return K(e,2);if(e<10**4)return new Intl.NumberFormat().format(Number.parseFloat(K(e,1)));let n=10**1,t=String(e);for(let o=Oe.length-1;o>=0;o--){let r=10**((o+1)*3);if(r<=e){e=e*n/r/n,t=K(e,1)+Oe[o];break}}return t}import{useAccount as Ko,useBalance as Qo,useChainId as qo,useChains as Jo,useDisconnect as en}from"wagmi";var D={CONNECT:"connect",CHAIN:"chain",PROFILE:"profile"};import{createContext as zo,createElement as Oo,useContext as $e,useEffect as Vo,useMemo as Lo,useState as Ae}from"react";import{createGlobalStyle as Fo,ThemeProvider as Uo}from"styled-components";import{reset as Ho}from"styled-reset";import{useConfig as Zo,WagmiContext as _o}from"wagmi";import{useState as Nt}from"react";import fe from"styled-components";import{useChainId as Gt,useChains as zt,useSwitchChain as Ot}from"wagmi";import At from"styled-components";import{jsx as Le}from"react/jsx-runtime";var O=e=>Le($t,{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,className:"lucide lucide-loader",...e,children:Le("path",{d:"M12 2v4M16.2 7.8l2.9-2.9M18 12h4M16.2 16.2l2.9 2.9M12 18v4M4.9 19.1l2.9-2.9M2 12h4M4.9 4.9l2.9 2.9"})}),$t=At.svg`
11
+ @keyframes spin {
12
+ from {
13
+ transform: rotate(0deg);
14
+ }
15
+ to {
16
+ transform: rotate(360deg);
17
+ }
18
+ }
19
+
20
+ animation: spin 2s linear infinite;
21
+ `;import{motion as Bt}from"motion/react";import x from"styled-components";var Q=x.div`
22
+ display: flex;
23
+ flex-direction: row;
24
+ gap: 12px;
25
+ overflow: hidden;
26
+ height: 394px;
27
+ `,Fe=x.div`
28
+ display: flex;
29
+ flex-direction: column;
30
+ align-items: center;
31
+ gap: 12px;
32
+ padding-right: 8px;
33
+ width: 320px;
34
+ `,Ue=x.div`
35
+ display: flex;
36
+ flex-direction: column;
37
+ justify-content: center;
38
+ align-items: center;
39
+ flex: 1;
40
+ position: relative;
41
+
42
+ svg {
43
+ width: 100% !important;
44
+ height: auto !important;
45
+ }
46
+ `,q=x.div`
47
+ width: ${({$isMobile:e})=>e?"100%":"280px"};
48
+ display: flex;
49
+ flex-direction: column;
50
+ gap: 8px;
51
+ `,Dn=x.img`
52
+ width: 20px;
53
+ height: 20px;
54
+ `,A=x.div`
55
+ width: 48px;
56
+ height: 4px;
57
+ background-color: ${({theme:e})=>e.colors.TEXT};
58
+ margin-left: 8px;
59
+ `,k=x.h3`
60
+ font-size: 18px;
61
+ font-weight: 600;
62
+ line-height: 24px;
63
+ margin-left: 8px;
64
+ `,U=x.p`
65
+ font-size: 12px;
66
+ font-weight: 400;
67
+ line-height: 16px;
68
+ margin-left: 8px;
69
+ max-width: 250px;
70
+ font-weight: 500;
71
+ margin: 8px 0 8px 8px;
72
+ color: ${({theme:e})=>e.colors.TEXT_SECONDARY};
73
+ `,He=x.div`
74
+ display: flex;
75
+ flex-direction: column;
76
+ align-items: center;
77
+ justify-content: center;
78
+ height: 100%;
79
+ `,J=x(Bt.div)`
80
+ display: flex;
81
+ flex-direction: column;
82
+ width: 100%;
83
+ height: 100%;
84
+ `,ee=x.span`
85
+ color: ${({theme:e})=>e.colors.PRIMARY_ACCENT};
86
+ `,H=x.div`
87
+ height: 40px;
88
+ transition: background-color 0.15s ease-in-out;
89
+ border-radius: 8px;
90
+ display: flex;
91
+ padding: 0 8px;
92
+ gap: 8px;
93
+ flex-direction: row;
94
+ align-items: center;
95
+ cursor: pointer;
96
+ color: ${({theme:e,selected:n})=>n?"#fff":e.colors.TEXT};
97
+ background-color: ${({theme:e,selected:n})=>n?e.colors.PRIMARY:"transparent"};
98
+ &:hover {
99
+ background-color: ${({theme:e,selected:n})=>n?e.colors.PRIMARY:e.colors.BG_SECONDARY};
100
+ }
101
+ `;H.defaultProps={role:"button"};var te=x.div`
102
+ font-size: 14px;
103
+ font-weight: 400;
104
+ line-height: 20px;
105
+ font-weight: 600;
106
+ flex: 1;
107
+ `,v=x.div`
108
+ width: ${({$size:e})=>e||28}px;
109
+ height: ${({$size:e})=>e||28}px;
110
+ border: 1px solid ${({theme:e})=>e.colors.BORDER};
111
+ background-color: ${({theme:e})=>e.colors.BACKGROUND};
112
+ border-radius: ${({$br:e})=>e||6}px;
113
+ display: flex;
114
+ align-items: center;
115
+ justify-content: center;
116
+ color: ${({theme:e})=>e.colors.TEXT};
117
+
118
+ svg {
119
+ width: 70% !important;
120
+ height: auto !important;
121
+ }
122
+ `;import{jsx as oe,jsxs as Ze}from"react/jsx-runtime";function _e(){let e=zt(),n=Gt(),{switchChain:t,isPending:o}=Ot(),[r,i]=Nt(n),a=s=>{i(s),t({chainId:s},{onError:()=>{i(n)}})};return Ze(Vt,{children:[oe(k,{children:"Switch Chain"}),oe(A,{}),e.map(s=>Ze(Lt,{selected:s.id===r,onClick:()=>a(s.id),children:[oe(Ft,{children:s.name}),o&&s.id===r&&oe(O,{})]},s.id))]})}var Vt=fe.div`
123
+ width: 280px;
124
+ display: flex;
125
+ flex-direction: column;
126
+ gap: 12px;
127
+ `,Lt=fe.div`
128
+ height: 40px;
129
+ transition: background-color 0.15s ease-in-out;
130
+ border-radius: 8px;
131
+ display: flex;
132
+ padding: 0 8px;
133
+ gap: 8px;
134
+ flex-direction: row;
135
+ align-items: center;
136
+ cursor: pointer;
137
+ color: ${({theme:e,selected:n})=>n?"#fff":e.colors.TEXT};
138
+ background-color: ${({theme:e,selected:n})=>n?e.colors.PRIMARY:"transparent"};
139
+ &:hover {
140
+ background-color: ${({theme:e,selected:n})=>n?e.colors.PRIMARY:e.colors.BG_SECONDARY};
141
+ }
142
+ `,Ft=fe.span`
143
+ font-size: 14px;
144
+ font-weight: 400;
145
+ flex: 1;
146
+ `;import{AnimatePresence as ho}from"motion/react";import{useState as go}from"react";import uo from"styled-components";import{useEffect as _t,useRef as jt,useState as Ce}from"react";import{useConnect as Yt}from"wagmi";import{walletConnect as Xt}from"wagmi/connectors";function ne(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)}function Ut(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)}function Ht(){return typeof navigator<"u"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function he(){return Ut()||Ht()}function ge(){return ne()||he()}function re(){return typeof window<"u"&&window.innerWidth<680}import{useConnectors as Zt}from"wagmi";function ue(){let n=Zt()||[];return[...n.filter(t=>t.id==="indodax"),...n.filter(t=>t.id!=="indodax")].filter((t,o,r)=>!((t.id==="metaMaskSDK"||t.id==="metaMask")&&r.find(i=>i.id==="io.metamask"||i.id==="io.metamask.mobile"))).sort((t,o)=>t.type==="injected"&&o.type!=="injected"?-1:t.type!=="injected"&&o.type==="injected"?1:0)}function je(e,n){let t=ue();return e==="injected"&&n?t.find(o=>o.id===e&&o.name===n):e==="injected"?t.find(o=>o.id===e&&o.name.includes("Injected")):t.find(o=>o.id===e)}function ie(){let{closeModal:e,walletConnectProjectId:n}=$(),[t,o]=Ce(null),r=je("walletConnect"),[i,a]=Ce(null),[s,c]=Ce(!1),{connectAsync:p}=Yt(),C=async m=>{let u=await m.getProvider();return new Promise(P=>u.once("display_uri",g=>{P(g)}))},l=async m=>{let u=await C(m);a(u),c(!1)},d=async m=>{let u=m.connector;if(console.log(typeof m.getWalletConnectDeeplink),m.getWalletConnectDeeplink)return;let P=document.createElement("style");P.innerHTML="w3m-modal, wcm-modal{ --wcm-z-index: 2147483647; --w3m-z-index:2147483647; }",document.head.appendChild(P);let g=u;n&&m.id!=="indodax"&&(g=Xt({projectId:n,showQrModal:!0})),ge()&&l(u);try{await p({connector:g})}catch(Y){console.error("WalletConnect",Y)}document.head.removeChild(P)},E=async m=>{if(console.log({wallet:m}),ge()&&d(m),m.connector.type!=="injected"&&!i&&l(m.connector),m.connector.type==="injected"){if(m.id.includes("metaMask")&&!m.isInstalled){try{i||(c(!0),l(r)),await p({connector:r}),c(!1),o(null),e()}catch(u){console.error("WalletConnect error:",u),c(!1),o(null)}c(!1);return}a(null)}i||c(!0),m.connector.connect().then(u=>{u.accounts.length>0&&(c(!1),o(null),e())}).catch(u=>{console.error(u),c(!1),o(null)})},W=jt(E);return W.current=E,_t(()=>{t&&W.current(t)},[t]),{wallet:t,setWallet:o,uri:i,setUri:a,isConnecting:s,setIsConnecting:c,onWalletConnect:d}}import{jsx as xe,jsxs as Kt}from"react/jsx-runtime";var Ye=e=>Kt("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,className:"icon icon-tabler icons-tabler-outline icon-tabler-wallet",...e,children:[xe("path",{stroke:"none",d:"M0 0h24v24H0z"}),xe("path",{d:"M17 8V5a1 1 0 0 0-1-1H6a2 2 0 0 0 0 4h12a1 1 0 0 1 1 1v3m0 4v3a1 1 0 0 1-1 1H6a2 2 0 0 1-2-2V6"}),xe("path",{d:"M20 12v4h-4a2 2 0 0 1 0-4h4"})]});import{jsx as Z,jsxs as Qt}from"react/jsx-runtime";var we=e=>Qt("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 255 200",fill:"none",...e,children:[Z("g",{clipPath:"url(#a)",children:Z("path",{fill:"#0F9DCE",fillRule:"evenodd",d:"m231.507 39.263-17.272-16.724-67.972 65.667h-67.23L39.23 49.566a11.4 11.4 0 0 1-3.013-.755 11.057 11.057 0 0 1-4.991-3.973 10.562 10.562 0 0 1-1.875-5.995c0-2.862 1.172-5.606 3.258-7.63 2.086-2.023 4.915-3.16 7.865-3.16 2.2 0 4.35.633 6.18 1.819a10.869 10.869 0 0 1 4.096 4.842c.59 1.383.875 2.864.844 4.346l34.638 33.111h53.543L214.235 0l40.443 39.263-77.24 74.929 36.335 35.247c2.135.036 4.216.666 5.993 1.817a10.868 10.868 0 0 1 4.097 4.842 10.502 10.502 0 0 1 .633 6.235 10.699 10.699 0 0 1-3.044 5.524 11.235 11.235 0 0 1-5.695 2.953 11.44 11.44 0 0 1-6.426-.614 11.058 11.058 0 0 1-4.992-3.974 10.569 10.569 0 0 1-1.845-5.199l-48.167-47.131 77.242-74.63h-.062ZM77.581 91.983h16.498l-70.845 68.754 17.24 16.755 67.694-65.668h38.126l67.972 65.668 17.272-16.755-36.259-34.887a11.442 11.442 0 0 1-4.111-.818 11.055 11.055 0 0 1-4.996-3.974 10.562 10.562 0 0 1-1.877-5.997c0-2.856 1.168-5.596 3.248-7.619 2.078-2.023 4.9-3.163 7.844-3.171a11.37 11.37 0 0 1 6.188 1.804 10.873 10.873 0 0 1 4.11 4.836c.419.975.686 2 .797 3.039l48.351 46.817L214.235 200l-74.46-72.142H114.78L40.474 200 0 160.737l62.534-60.722L0 39.263 40.474 0l50.694 49.177c1.81.175 3.552.779 5.074 1.765a10.874 10.874 0 0 1 4.097 4.842 10.482 10.482 0 0 1 .632 6.234 10.684 10.684 0 0 1-3.043 5.525 11.235 11.235 0 0 1-5.696 2.953 11.44 11.44 0 0 1-6.426-.614 11.056 11.056 0 0 1-4.992-3.974 10.566 10.566 0 0 1-1.873-5.825L40.474 22.539l-17.24 16.724 54.347 52.72Zm-25.973 69.212 54.583-53.298h49.032l58.947-57.415c.5-.03.999-.092 1.494-.187a11.233 11.233 0 0 0 5.695-2.953 10.696 10.696 0 0 0 3.044-5.525 10.49 10.49 0 0 0-.632-6.234 10.865 10.865 0 0 0-4.098-4.842 11.366 11.366 0 0 0-6.179-1.819c-2.95 0-5.779 1.137-7.865 3.16-2.01 1.95-3.171 4.57-3.253 7.317l-54.475 52.584H99.61l-59.048 57.396h-.026c-2.95 0-5.78 1.136-7.865 3.16-2.086 2.024-3.258 4.768-3.258 7.629 0 2.135.652 4.221 1.875 5.995a11.062 11.062 0 0 0 4.991 3.974 11.442 11.442 0 0 0 6.427.614 11.23 11.23 0 0 0 5.694-2.953 10.697 10.697 0 0 0 3.044-5.524c.074-.358.128-.718.164-1.079Z",clipRule:"evenodd"})}),Z("defs",{children:Z("clipPath",{id:"a",children:Z("path",{fill:"#fff",d:"M0 0h254.833v200H0z"})})})]});import{jsx as y,jsxs as qt}from"react/jsx-runtime";var ye=e=>qt("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",id:"Layer_1",x:0,y:0,viewBox:"0 0 318.6 318.6",width:20,height:20,...e,children:[y("style",{children:".st1,.st2,.st3,.st4,.st5,.st6,.st9{fill:#e4761b;stroke:#e4761b;stroke-linecap:round;stroke-linejoin:round}.st2,.st3,.st4,.st5,.st6,.st9{fill:#d7c1b3;stroke:#d7c1b3}.st3,.st4,.st5,.st6,.st9{fill:#233447;stroke:#233447}.st4,.st5,.st6,.st9{fill:#cd6116;stroke:#cd6116}.st5,.st6,.st9{fill:#e4751f;stroke:#e4751f}.st6,.st9{fill:#f6851b;stroke:#f6851b}.st9{fill:#763d16;stroke:#763d16}"}),y("path",{d:"m274.1 35.5-99.5 73.9L193 65.8z",style:{fill:"#e2761b",stroke:"#e2761b",strokeLinecap:"round",strokeLinejoin:"round"}}),y("path",{d:"m44.4 35.5 98.7 74.6-17.5-44.3zM238.3 206.8l-26.5 40.6 56.7 15.6 16.3-55.3zM33.9 207.7 50.1 263l56.7-15.6-26.5-40.6z",className:"st1"}),y("path",{d:"m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zM214.9 138.2l-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zM177.9 230.9l33.9 16.5-4.7-39.3z",className:"st1"}),y("path",{d:"m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zM106.8 247.4l31.5 14.9-.2-9.3 2.5-22.1z",className:"st2"}),y("path",{d:"m138.8 193.5-28.2-8.3 19.9-9.1zM179.7 193.5l8.3-17.4 20 9.1z",className:"st3"}),y("path",{d:"m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zM230.8 162.1l-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zM110.6 185.2l20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z",className:"st4"}),y("path",{d:"m87.8 162.1 23.6 46-.8-22.9zM208.1 185.2l-1 22.9 23.7-46zM144.1 164.6l-5.3 28.9 6.6 34.1 1.5-44.9zM174.6 164.6l-2.7 18 1.2 45 6.7-34.1z",className:"st5"}),y("path",{d:"m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zM110.6 185.2l.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z",className:"st6"}),y("path",{d:"m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z",style:{fill:"#c0ad9e",stroke:"#c0ad9e",strokeLinecap:"round",strokeLinejoin:"round"}}),y("path",{d:"m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z",style:{fill:"#161616",stroke:"#161616",strokeLinecap:"round",strokeLinejoin:"round"}}),y("path",{d:"m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z",className:"st9"}),y("path",{d:"m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zM103.6 138.2l-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zM174.6 164.6l3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z",className:"st6"})]});import{jsx as N,jsxs as Xe}from"react/jsx-runtime";var be=e=>Xe("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 178 112",fill:"none",...e,children:[Xe("g",{clipPath:"url(#a)",children:[N("path",{fill:"#fff",d:"M65.333 32.667C65.333 14.625 79.958 0 98 0h46.666c18.042 0 32.667 14.625 32.667 32.667v46.666c0 18.042-14.625 32.667-32.667 32.667H98c-18.042 0-32.667-14.625-32.667-32.667V32.667Z"}),N("path",{fill:"#202020",d:"m109.238 77 16.376-44.333h4.806L114.047 77h-4.809Z"}),N("path",{fill:"#fff",d:"M0 30.333C0 13.58 13.58 0 30.333 0c16.754 0 30.334 13.58 30.334 30.333v51.334C60.667 98.42 47.087 112 30.333 112 13.58 112 0 98.42 0 81.667V30.333Z"}),N("path",{fill:"#202020",d:"M27.417 69.998v-5.833h5.833v5.833h-5.833Z"})]}),N("defs",{children:N("clipPath",{id:"a",children:N("path",{fill:"#fff",d:"M0 0h177.333v112H0z"})})})]});import{jsx as Ke}from"react/jsx-runtime";var ve=e=>Ke("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 480 332",fill:"none",...e,children:Ke("path",{fill:"#3396ff",d:"M126.613 93.984c62.622-61.312 164.152-61.312 226.775 0l7.536 7.379a7.735 7.735 0 0 1 0 11.102l-25.781 25.242a4.07 4.07 0 0 1-5.67 0l-10.371-10.154c-43.687-42.773-114.517-42.773-158.204 0l-11.107 10.874a4.069 4.069 0 0 1-5.669 0l-25.781-25.242a7.733 7.733 0 0 1 0-11.102zm280.093 52.204 22.946 22.465a7.735 7.735 0 0 1 0 11.102L326.189 281.056c-3.131 3.065-8.208 3.065-11.339 0l-73.432-71.896a2.034 2.034 0 0 0-2.835 0l-73.43 71.896c-3.131 3.065-8.208 3.065-11.339 0L50.348 179.754a7.735 7.735 0 0 1 0-11.102l22.946-22.466c3.131-3.065 8.208-3.065 11.339 0l73.433 71.897a2.033 2.033 0 0 0 2.834 0l73.429-71.897c3.131-3.065 8.208-3.065 11.339 0l73.433 71.897a2.034 2.034 0 0 0 2.835 0l73.431-71.895c3.132-3.066 8.208-3.066 11.339 0z"})});import{jsx as T}from"react/jsx-runtime";var Pe={injected:{name:"Browser Wallet",shortName:"Browser",icon:T(Ye,{})},indodax:{name:"Indodax",shortName:"Indodax",icon:T(we,{}),iconConnector:T(we,{}),getWalletConnectDeeplink:e=>ne()?e:`indodaxweb3://wc/${encodeURIComponent(e)}`,getBrowserDeeplink:e=>`https://indodaxwebapp.xellar.co/connections/add?uri=${encodeURIComponent(e)}`},"metaMask, metaMask-io, io.metamask, io.metamask.mobile, metaMaskSDK":{name:"MetaMask",icon:T(ye,{}),iconConnector:T(ye,{}),iconShouldShrink:!0,downloadUrls:{download:"https://connect.family.co/v0/download/metamask",website:"https://metamask.io/download/",android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/app/metamask/id1438144202",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask/",brave:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm"},getWalletConnectDeeplink:e=>ne()?e:he()?`metamask://wc?uri=${encodeURIComponent(e)}`:`https://metamask.app.link/wc?uri=${encodeURIComponent(e)}`},"app.phantom":{name:"Phantom"},reown:{name:"Reown",shortName:"Reown",icon:T(be,{}),iconConnector:T(be,{})},walletConnect:{name:"WalletConnect",shortName:"WalletConnect",icon:T(ve,{}),iconConnector:T(ve,{})}};import{jsx as qe}from"react/jsx-runtime";var Qe=e=>e==="injected",Jt=e=>e==="coinbaseWalletSDK";var ae=()=>ue().map(t=>{let o=Object.keys(Pe).find(i=>i.split(",").map(a=>a.trim()).indexOf(t.id)!==-1),r={id:t.id,name:t.name??t.id??t.type,icon:qe("img",{src:t.icon,alt:t.name,width:"100%",height:"100%"}),connector:t,isInstalled:t.type==="mock"||t.type==="injected"&&t.id!=="metaMask"||Jt(t.id)};if(o){let i=Pe[o];return{...r,iconConnector:t.icon?qe("img",{src:t.icon,alt:t.name,width:"100%",height:"100%"}):void 0,...i}}return r}).filter((t,o,r)=>r.findIndex(i=>i.id===t.id)===o).map(t=>t.id==="walletConnect"?{...t,name:t.name,shortName:t.shortName}:t).filter((t,o,r)=>!(t.id==="coinbaseWalletSDK"&&r.find(i=>i.id==="com.coinbase.wallet"))).filter((t,o,r)=>!((t.id==="metaMaskSDK"||t.id==="metaMask")&&r.find(i=>i.id==="io.metamask"||i.id==="io.metamask.mobile"))).sort((t,o)=>{let r=t.isInstalled&&Qe(t.connector.type),i=o.isInstalled&&Qe(o.connector.type);return r&&!i?-1:!r&&i?1:0}).sort((t,o)=>t.id==="walletConnect"?1:o.id==="walletConnect"?-1:0).sort((t,o)=>t.id==="indodax"?-1:o.id==="indodax"?1:0);import{jsx as h,jsxs as G}from"react/jsx-runtime";var Je=e=>G("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 24 24",fill:"none",...e,children:[h("path",{fill:"#4285F4",d:"M12 9.818v4.648h6.458c-.283 1.494-1.134 2.76-2.41 3.61l3.894 3.022c2.269-2.094 3.578-5.17 3.578-8.825 0-.85-.076-1.67-.218-2.455H12Z"}),h("path",{fill:"#34A853",d:"m5.275 14.284-.879.673-3.109 2.421C3.262 21.295 7.31 24 12 24c3.24 0 5.957-1.069 7.942-2.902l-3.894-3.021c-1.07.72-2.433 1.156-4.048 1.156-3.12 0-5.77-2.105-6.72-4.942l-.004-.007Z"}),h("path",{fill:"#FBBC05",d:"M1.287 6.622A11.852 11.852 0 0 0 0 12c0 1.941.469 3.763 1.287 5.378 0 .01 3.993-3.098 3.993-3.098A7.191 7.191 0 0 1 4.898 12c0-.797.142-1.56.382-2.28L1.287 6.622Z"}),h("path",{fill:"#EA4335",d:"M12 4.778c1.767 0 3.338.611 4.593 1.79l3.436-3.437C17.945 1.189 15.239 0 11.999 0 7.31 0 3.263 2.695 1.288 6.622L5.28 9.72c.949-2.836 3.6-4.942 6.72-4.942Z"})]}),et=e=>G("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 24 24",fill:"none",...e,children:[G("g",{clipPath:"url(#a)",children:[h("path",{fill:"url(#b)",d:"M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12Z"}),h("path",{fill:"#fff",fillRule:"evenodd",d:"M5.432 11.873c3.498-1.524 5.83-2.529 6.998-3.014 3.333-1.387 4.025-1.627 4.476-1.635.1-.002.322.023.465.14a.506.506 0 0 1 .171.324c.016.094.036.306.02.473-.18 1.897-.962 6.502-1.36 8.627-.168.9-.499 1.2-.82 1.23-.696.064-1.225-.46-1.9-.903-1.056-.692-1.653-1.123-2.678-1.799-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.213-.07-.062-.174-.04-.249-.024-.106.024-1.793 1.14-5.061 3.346-.48.329-.913.49-1.302.48-.428-.009-1.252-.242-1.865-.44-.752-.245-1.349-.374-1.297-.79.027-.215.325-.436.893-.662Z",clipRule:"evenodd"})]}),G("defs",{children:[G("linearGradient",{id:"b",x1:12,x2:12,y1:0,y2:23.822,gradientUnits:"userSpaceOnUse",children:[h("stop",{stopColor:"#2AABEE"}),h("stop",{offset:1,stopColor:"#229ED9"})]}),h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]}),tt=e=>G("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 24 26",fill:"none",...e,children:[h("path",{fill:"#F1F1F1",d:"M22.676 20.262c-.4.908-.874 1.744-1.422 2.513-.748 1.048-1.36 1.774-1.833 2.176-.731.662-1.515 1-2.355 1.02-.602 0-1.33-.169-2.175-.51-.849-.341-1.629-.51-2.342-.51-.748 0-1.55.169-2.408.51-.86.341-1.552.52-2.081.537-.805.034-1.607-.315-2.408-1.047-.512-.438-1.15-1.189-1.917-2.253-.822-1.136-1.497-2.454-2.027-3.956-.566-1.623-.85-3.194-.85-4.715 0-1.742.383-3.245 1.15-4.504a6.69 6.69 0 0 1 2.41-2.396 6.568 6.568 0 0 1 3.257-.903c.64 0 1.478.194 2.52.576 1.04.383 1.706.578 1.999.578.218 0 .96-.227 2.216-.68 1.188-.42 2.19-.595 3.012-.526 2.226.176 3.899 1.039 5.01 2.592-1.99 1.186-2.975 2.846-2.955 4.976.018 1.659.63 3.04 1.834 4.135a6.035 6.035 0 0 0 1.832 1.182c-.147.419-.302.82-.467 1.205ZM17.571.52c0 1.3-.484 2.515-1.447 3.638-1.163 1.336-2.57 2.108-4.094 1.986-.02-.156-.031-.32-.031-.492 0-1.249.553-2.585 1.535-3.677.49-.553 1.114-1.013 1.87-1.38.754-.36 1.468-.56 2.14-.595.019.174.027.348.027.52Z"}),h("path",{stroke:"#fff",strokeOpacity:.15,d:"M20.847 22.485a13.569 13.569 0 0 0 1.669-3.165 6.564 6.564 0 0 1-1.544-1.077c-1.307-1.191-1.976-2.704-1.995-4.498-.02-2.145.909-3.858 2.722-5.105-1.003-1.155-2.425-1.82-4.316-1.97h-.002c-.724-.06-1.65.091-2.803.498h-.001l-.167-.47c-1.256.453-1.998.68-2.216.68-.293 0-.96-.195-1.999-.578l10.652 15.685Zm0 0c-.744 1.041-1.327 1.725-1.75 2.086l-.006.005-.005.004c-.657.594-1.328.873-2.025.89-.515 0-1.173-.146-1.983-.473l-.001-.001c-.893-.358-1.736-.545-2.528-.545-.823 0-1.688.186-2.593.544-.839.334-1.468.488-1.913.503H8.04c-.633.027-1.312-.241-2.05-.916l-.006-.005-.006-.005c-.465-.398-1.076-1.11-1.836-2.166-.79-1.093-1.445-2.367-1.96-3.83-.551-1.576-.824-3.091-.824-4.549 0-1.667.366-3.077 1.078-4.244l.002-.004a6.19 6.19 0 0 1 2.233-2.22 6.068 6.068 0 0 1 3.01-.835c.55 0 1.322.172 2.343.546l10.824 15.215ZM13.906 2.309l.002-.002c.44-.497 1.008-.92 1.713-1.261a5.717 5.717 0 0 1 1.45-.489c-.01 1.15-.438 2.24-1.325 3.274-.98 1.124-2.088 1.769-3.247 1.822v-.001c0-1.106.493-2.326 1.407-3.343Z"})]}),ot=e=>G("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 24 26",fill:"none",...e,children:[h("path",{fill:"#000000",d:"M22.676 20.262c-.4.908-.874 1.744-1.422 2.513-.748 1.048-1.36 1.774-1.833 2.176-.731.662-1.515 1-2.355 1.02-.602 0-1.33-.169-2.175-.51-.849-.341-1.629-.51-2.342-.51-.748 0-1.55.169-2.408.51-.86.341-1.552.52-2.081.537-.805.034-1.607-.315-2.408-1.047-.512-.438-1.15-1.189-1.917-2.253-.822-1.136-1.497-2.454-2.027-3.956-.566-1.623-.85-3.194-.85-4.715 0-1.742.383-3.245 1.15-4.504a6.69 6.69 0 0 1 2.41-2.396 6.568 6.568 0 0 1 3.257-.903c.64 0 1.478.194 2.52.576 1.04.383 1.706.578 1.999.578.218 0 .96-.227 2.216-.68 1.188-.42 2.19-.595 3.012-.526 2.226.176 3.899 1.039 5.01 2.592-1.99 1.186-2.975 2.846-2.955 4.976.018 1.659.63 3.04 1.834 4.135a6.035 6.035 0 0 0 1.832 1.182c-.147.419-.302.82-.467 1.205ZM17.571.52c0 1.3-.484 2.515-1.447 3.638-1.163 1.336-2.57 2.108-4.094 1.986-.02-.156-.031-.32-.031-.492 0-1.249.553-2.585 1.535-3.677.49-.553 1.114-1.013 1.87-1.38.754-.36 1.468-.56 2.14-.595.019.174.027.348.027.52Z"}),h("path",{stroke:"#000000",strokeOpacity:.15,d:"M20.847 22.485a13.569 13.569 0 0 0 1.669-3.165 6.564 6.564 0 0 1-1.544-1.077c-1.307-1.191-1.976-2.704-1.995-4.498-.02-2.145.909-3.858 2.722-5.105-1.003-1.155-2.425-1.82-4.316-1.97h-.002c-.724-.06-1.65.091-2.803.498h-.001l-.167-.47c-1.256.453-1.998.68-2.216.68-.293 0-.96-.195-1.999-.578l10.652 15.685Zm0 0c-.744 1.041-1.327 1.725-1.75 2.086l-.006.005-.005.004c-.657.594-1.328.873-2.025.89-.515 0-1.173-.146-1.983-.473l-.001-.001c-.893-.358-1.736-.545-2.528-.545-.823 0-1.688.186-2.593.544-.839.334-1.468.488-1.913.503H8.04c-.633.027-1.312-.241-2.05-.916l-.006-.005-.006-.005c-.465-.398-1.076-1.11-1.836-2.166-.79-1.093-1.445-2.367-1.96-3.83-.551-1.576-.824-3.091-.824-4.549 0-1.667.366-3.077 1.078-4.244l.002-.004a6.19 6.19 0 0 1 2.233-2.22 6.068 6.068 0 0 1 3.01-.835c.55 0 1.322.172 2.343.546l10.824 15.215ZM13.906 2.309l.002-.002c.44-.497 1.008-.92 1.713-1.261a5.717 5.717 0 0 1 1.45-.489c-.01 1.15-.438 2.24-1.325 3.274-.98 1.124-2.088 1.769-3.247 1.822v-.001c0-1.106.493-2.326 1.407-3.343Z"})]}),nt=e=>h("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 24 24",fill:"none",...e,children:h("path",{fill:"#25D366",d:"m0 24 1.687-6.163A11.867 11.867 0 0 1 .1 11.891C.103 5.335 5.438 0 11.993 0a11.817 11.817 0 0 1 8.413 3.488 11.824 11.824 0 0 1 3.48 8.414c-.003 6.557-5.338 11.892-11.893 11.892a11.9 11.9 0 0 1-5.688-1.448L0 24Zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981Zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372S5.95 7.788 5.95 9.251s1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414Z"})}),rt=e=>h("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 26 26",...e,children:h("path",{fill:"#fff",d:"M19.853 2.063h3.655l-7.984 9.125 9.392 12.418h-7.354l-5.76-7.532-6.592 7.532H1.554l8.54-9.761L1.083 2.062h7.541l5.207 6.884 6.022-6.883ZM18.57 21.418h2.026L7.524 4.135H5.35l13.22 17.283Z"})});import B from"styled-components";var it=B.div`
147
+ display: flex;
148
+ flex-direction: column;
149
+ align-items: center;
150
+ justify-content: center;
151
+ padding: 16px;
152
+ height: 100%;
153
+ `,at=B.div`
154
+ display: flex;
155
+ flex-direction: column;
156
+ align-items: center;
157
+ justify-content: center;
158
+ gap: 24px;
159
+ width: 300px;
160
+ `,st=B.h3`
161
+ font-size: 14px;
162
+ font-weight: 600;
163
+ line-height: 24px;
164
+ margin-bottom: 24px;
165
+ `,lt=B.div`
166
+ display: flex;
167
+ flex-direction: row;
168
+ align-items: center;
169
+ justify-content: center;
170
+ gap: 12px;
171
+ `,ct=B.input`
172
+ height: 48px;
173
+ border-radius: 12px;
174
+ border: 1px solid ${({theme:e})=>e.colors.BORDER};
175
+ padding: 0 12px;
176
+ display: block;
177
+ background-color: transparent;
178
+ `,Ie=B.div`
179
+ flex: 1;
180
+ height: 1px;
181
+ background-color: ${({theme:e})=>e.colors.BORDER};
182
+ `,pt=B.div`
183
+ display: flex;
184
+ flex-direction: row;
185
+ align-items: center;
186
+ justify-content: center;
187
+ gap: 12px;
188
+ width: 100%;
189
+ font-size: 12px;
190
+ font-weight: 400;
191
+ line-height: 16px;
192
+ color: ${({theme:e})=>e.colors.TEXT};
193
+ `,dt=B(R)`
194
+ height: 42px;
195
+ text-align: center;
196
+ display: flex;
197
+ align-items: center;
198
+ justify-content: center;
199
+ padding: 0 12px;
200
+ font-weight: 600;
201
+ font-size: 13px;
202
+ border-radius: 8px;
203
+ `;import{jsx as f,jsxs as V}from"react/jsx-runtime";function se(){let{theme:e}=$();return f(J,{initial:{opacity:0,x:50},animate:{opacity:1,x:0},exit:{opacity:0,x:-50},children:V(it,{children:[V(st,{style:{textAlign:"center"},children:["The gateway to ",f("span",{style:{color:"#01CFEA"},children:"manage"})," ","everything in your ",f("span",{style:{color:"#FF1CF7"},children:"wallet"})]}),V(at,{children:[V(lt,{children:[f(v,{$size:48,$br:12,children:f(Je,{})}),f(v,{$size:48,$br:12,children:f(et,{})}),f(v,{$size:48,$br:12,children:e==="dark"?f(tt,{}):f(ot,{})}),f(v,{$size:48,$br:12,children:f(nt,{})}),f(v,{$size:48,$br:12,children:f(rt,{})})]}),V(pt,{children:[f(Ie,{}),f("span",{children:"Or"}),f(Ie,{})]}),V("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:12},children:[f(ct,{type:"email",placeholder:"Enter your email"}),f(dt,{children:"Sign In"})]})]})]})})}import{motion as ht}from"motion/react";import{useState as so}from"react";import _,{useTheme as lo}from"styled-components";import{jsx as mt}from"react/jsx-runtime";var le=e=>mt("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:16,viewBox:"0 0 15 16",fill:"none",...e,children:mt("path",{fill:e.color||"#fff",d:"M14.375.5h-10a.625.625 0 0 0-.625.625V4.25H.625A.625.625 0 0 0 0 4.875v10a.625.625 0 0 0 .625.625h10a.624.624 0 0 0 .625-.625V11.75h3.125a.624.624 0 0 0 .625-.625v-10A.625.625 0 0 0 14.375.5ZM10 14.25H1.25V5.5H10v8.75Zm3.75-3.75h-2.5V4.875a.625.625 0 0 0-.625-.625H5v-2.5h8.75v8.75Z"})});import{motion as eo}from"motion/react";import to from"qrcode";import{useMemo as oo}from"react";import Me from"styled-components";import{jsx as M,jsxs as ke}from"react/jsx-runtime";var no=(e,n)=>{let t=Array.prototype.slice.call(to.create(e,{errorCorrectionLevel:n}).modules.data,0),o=Math.sqrt(t.length);return t.reduce((r,i,a)=>(a%o===0?r.push([i]):r[r.length-1].push(i))&&r,[])};function ft({ecl:e="M",logoMargin:n=10,logoSize:t=50,icon:o,size:r=200,uri:i,blur:a=!1}){let s=r-Number.parseInt("20",10)*2,c=oo(()=>{let C=[],l=no(i,e),d=s/l.length;[{x:0,y:0},{x:1,y:0},{x:0,y:1}].forEach(({x:P,y:g})=>{let Y=(l.length-7)*d*P,I=(l.length-7)*d*g;for(let b=0;b<3;b++)C.push(M("rect",{fill:b%2!==0?"white":"black",height:d*(7-b*2),rx:(b-2)*-5+(b===0?2:0),ry:(b-2)*-5+(b===0?2:0),width:d*(7-b*2),x:Y+d*b,y:I+d*b},`${b}-${P}-${g}`))});let W=Math.floor((t+25)/d),m=l.length/2-W/2,u=l.length/2+W/2-1;return l.forEach((P,g)=>{P.forEach((Y,I)=>{l[g][I]&&(g<7&&I<7||g>l.length-8&&I<7||g<7&&I>l.length-8||g>m&&g<u&&I>m&&I<u||C.push(M("circle",{cx:g*d+d/2,cy:I*d+d/2,fill:"black",r:d/3},`circle-${g}-${I}`)))})}),C},[e,t,s,i]),p=t+n*2;return ke(ro,{children:[M(io,{style:{width:s,height:s,position:"relative",filter:a?"blur(2px)":"none",transition:"filter 0.2s ease-in-out"},children:ke("svg",{height:s,style:{all:"revert"},width:s,children:[M("title",{children:"QR Code"}),ke("defs",{children:[M("clipPath",{id:"clip-wrapper",children:M("rect",{height:p,width:p})}),M("clipPath",{id:"clip-logo",children:M("rect",{height:t,width:t})})]}),M("rect",{fill:"transparent",height:s,width:s}),c]})}),M(ao,{children:o})]})}var ro=Me(eo.div)`
204
+ background-color: #fff;
205
+ padding: 20px;
206
+ border-radius: 10px;
207
+ aspect-ratio: 1;
208
+ position: relative;
209
+ `,io=Me.div`
210
+ background-color: #fff;
211
+ `,ao=Me.div`
212
+ position: absolute;
213
+ z-index: 3;
214
+ top: 0;
215
+ left: 0;
216
+ right: 0;
217
+ bottom: 0;
218
+ display: flex;
219
+ align-items: center;
220
+ justify-content: center;
221
+ `;import{jsx as z,jsxs as Se}from"react/jsx-runtime";function We({isConnecting:e,uri:n,wallet:t,rawUri:o,browserUrl:r}){let i=lo(),[a,s]=so(!1),c=async()=>{a&&s(!1),"clipboard"in navigator&&(await navigator.clipboard.writeText(o),s(!0),setTimeout(()=>{s(!1)},3e3))},p=()=>t?t.icon:null;return Se(J,{initial:{opacity:0,x:50},animate:{opacity:1,x:0},exit:{opacity:0,x:-50},children:[Se(co,{children:[z(po,{children:"Scan With Your Phone"}),z(gt,{onClick:c,children:z(le,{color:i.colors.TEXT_SECONDARY})})]}),Se(Ue,{children:[z(ft,{blur:e,icon:z(v,{$size:48,children:p()}),size:320,uri:n}),a&&z(mo,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:"Copied to clipboard"}),r&&!a&&z(fo,{href:r,target:"_blank",rel:"noopener noreferrer",children:"Open in browser"})]})]})}var co=_.div`
222
+ display: flex;
223
+ flex-direction: row;
224
+ align-items: center;
225
+ justify-content: space-between;
226
+ `,po=_(k)`
227
+ flex-shrink: 0;
228
+ `,gt=_.div`
229
+ cursor: pointer;
230
+ `;gt.defaultProps={role:"button"};var mo=_(ht.p)`
231
+ font-size: 10px;
232
+ color: ${({theme:e})=>e.colors.TEXT_SECONDARY};
233
+ position: absolute;
234
+ bottom: 0;
235
+ left: 0;
236
+ right: 0;
237
+ text-align: center;
238
+ `,fo=_(ht.a)`
239
+ font-size: 12px;
240
+ position: absolute;
241
+ bottom: 0;
242
+ left: 0;
243
+ right: 0;
244
+ text-align: center;
245
+ color: ${({theme:e})=>e.colors.PRIMARY_ACCENT};
246
+ &:hover {
247
+ color: ${({theme:e})=>e.colors.PRIMARY};
248
+ }
249
+ `;import{jsx as w,jsxs as ce}from"react/jsx-runtime";function ut(){let e=ae(),{wallet:n,setWallet:t,uri:o,isConnecting:r}=ie(),i=n?.getBrowserDeeplink?n?.getWalletConnectDeeplink?.(o??""):o,a=o?n?.getBrowserDeeplink?.(o):null,[s]=go(!1),c=()=>s?w(se,{}):n?.id.includes("metaMask")&&!n.isInstalled&&o?w(We,{isConnecting:r,uri:o,wallet:n,rawUri:o,browserUrl:a}):i&&n&&o?w(We,{isConnecting:r,uri:i,wallet:n,rawUri:o,browserUrl:a}):w(He,{children:w(U,{style:{textAlign:"center"},children:"Choose a wallet on the left to get started. Wallets let you send, receive, and store digital assets securely."})});return ce(Q,{children:[ce(q,{$isMobile:!1,children:[ce(k,{children:["Connect ",w(ee,{children:"Wallet"})]}),w(A,{}),w(U,{children:"Wallets are used to send, receive, store, and display digital assets like Ethereum and NFTs."}),w(Co,{children:e.map(p=>ce(H,{onClick:()=>{t(p)},selected:p.id===n?.id,children:[w(v,{children:p.icon}),w(te,{children:p.name}),p.id===n?.id&&r&&w(O,{})]},p.id))})]}),w(Fe,{children:w(ho,{mode:"wait",children:c()})})]})}var Co=uo.div`
250
+ overflow-y: auto;
251
+ `;import{AnimatePresence as xo}from"motion/react";import{useState as wo}from"react";import yo from"styled-components";import{jsx as S,jsxs as Re}from"react/jsx-runtime";function Ct(){let e=ae(),{wallet:n,setWallet:t,isConnecting:o}=ie(),[r]=wo(!1);return S(Q,{children:S(xo,{mode:"wait",children:r?S(se,{}):Re(q,{$isMobile:!0,children:[Re(k,{children:["Connect ",S(ee,{children:"Wallet"})]}),S(A,{}),S(U,{children:"Wallets are used to send, receive, store, and display digital assets like Ethereum and NFTs."}),S(bo,{children:e.map(a=>Re(H,{onClick:()=>{t(a)},selected:a.id===n?.id,children:[S(v,{children:a.icon}),S(te,{children:a.name}),a.id===n?.id&&o&&S(O,{})]},a.id))})]})})})}var bo=yo.div`
252
+ overflow-y: auto;
253
+ `;import{useState as vo}from"react";import pe,{useTheme as Po}from"styled-components";import{useAccount as Io,useDisconnect as ko}from"wagmi";import{jsx as L,jsxs as xt}from"react/jsx-runtime";function wt(){let{closeModal:e}=$(),{disconnectAsync:n}=ko(),{address:t}=Io(),o=async()=>{await n(),e()},r=Po(),[i,a]=vo(!1),s=async()=>{i&&a(!1),"clipboard"in navigator&&(await navigator.clipboard.writeText(t??""),a(!0),setTimeout(()=>{a(!1)},3e3))};return xt(Mo,{children:[L(k,{children:"Connected"}),L(A,{}),xt(So,{children:[L(Wo,{children:X(t??"")}),L(yt,{onClick:s,children:L(le,{color:r.colors.TEXT_SECONDARY})})]}),L(R,{onClick:o,children:"Disconnect"})]})}var Mo=pe.div`
254
+ display: flex;
255
+ flex-direction: column;
256
+ gap: 16px;
257
+ width: 280px;
258
+ `,So=pe.div`
259
+ display: flex;
260
+ flex-direction: row;
261
+ gap: 8px;
262
+ height: 32px;
263
+ background-color: ${({theme:e})=>e.colors.BG_SECONDARY};
264
+ border-radius: 8px;
265
+ align-items: center;
266
+ padding: 0 12px;
267
+ `,Wo=pe.p`
268
+ font-size: 14px;
269
+ font-weight: 500;
270
+ flex: 1;
271
+ `,yt=pe.div`
272
+ cursor: pointer;
273
+ `;yt.defaultProps={role:"button"};import{AnimatePresence as Ro,motion as Ee}from"motion/react";import bt,{useCallback as To,useEffect as Te,useState as vt}from"react";import{createPortal as Eo}from"react-dom";import{RemoveScroll as Do}from"react-remove-scroll";import De from"styled-components";import{jsx as j}from"react/jsx-runtime";function Pt({isOpen:e,onClose:n,children:t}){let[o,r]=bt.useState(!1),[i,a]=vt(!1);Te(()=>{let l=()=>a(re());return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]),Te(()=>{let l=d=>e&&d.key==="Escape"&&n();return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[e,n]);let[s,c]=vt(!0);Te(()=>{c(getComputedStyle(window.document.body).overflow!=="hidden")},[]);let p=To(()=>n(),[n]);if(bt.useEffect(()=>(r(!0),()=>r(!1)),[]),!o)return null;let C=j(Do,{enabled:s,children:j(Ro,{children:e&&j(Ao,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:p,children:j($o,{variants:No[i?"mobile":"desktop"],initial:"initial",animate:"animate",exit:"exit",transition:{type:"spring",bounce:0,damping:20,mass:.5,stiffness:250},onClick:Go,$isMobile:i,children:j(Bo,{$isMobile:i,layout:!0,children:t})})})})});return Eo(C,document.body)}var Ao=De(Ee.div)`
274
+ position: fixed;
275
+ top: 0;
276
+ left: 0;
277
+ width: 100%;
278
+ height: 100%;
279
+ background: ${({theme:e})=>e.colors.BACKGROUND_TRANSPARENT};
280
+ backdrop-filter: blur(4px);
281
+ display: flex;
282
+ align-items: center;
283
+ justify-content: center;
284
+ z-index: 1000;
285
+ `,$o=De(Ee.div)`
286
+ font-family:
287
+ system-ui,
288
+ -apple-system,
289
+ BlinkMacSystemFont,
290
+ 'Segoe UI',
291
+ Roboto,
292
+ Oxygen,
293
+ Ubuntu,
294
+ Cantarell,
295
+ 'Open Sans',
296
+ 'Helvetica Neue',
297
+ sans-serif;
298
+ position: ${({$isMobile:e})=>e?"fixed":"relative"};
299
+ min-width: 280px;
300
+ max-width: ${({$isMobile:e})=>e?"100%":"90%"};
301
+ max-height: ${({$isMobile:e})=>e?"85vh":"90vh"};
302
+ margin-top: ${({$isMobile:e})=>e?"auto":"0"};
303
+ ${({$isMobile:e})=>e&&`
304
+ bottom: 0;
305
+ left: 0;
306
+ right: 0;
307
+ `}
308
+ `,Bo=De(Ee.div)`
309
+ padding: 18px;
310
+ overflow-y: auto;
311
+ background-color: ${({theme:e})=>e.colors.BACKGROUND};
312
+ border: 2px solid ${({theme:e})=>e.colors.BORDER};
313
+ border-radius: ${({$isMobile:e})=>e?"20px 20px 0 0":"20px"};
314
+ box-shadow: 0 4px 100px -19px ${({theme:e})=>e.colors.SHADOW};
315
+ color: ${({theme:e})=>e.colors.TEXT};
316
+ `,No={desktop:{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0}},mobile:{initial:{y:"100%",opacity:1},animate:{y:0,opacity:1},exit:{y:"100%",opacity:1}}},Go=e=>e.stopPropagation();import"styled-components";var de={colors:{BACKGROUND_TRANSPARENT:"rgba(0, 0, 0, 0.5)",PRIMARY:"#0F9DCE",PRIMARY_ACCENT:"#2AABEE",BACKGROUND:"#000000",TEXT:"#FFFFFF",TEXT_SECONDARY:"#737373",SHADOW:"#475D81",BORDER:"#262626",BG_SECONDARY:"#171717"}},It={...de,colors:{...de.colors,BACKGROUND:"#fafafa",TEXT:"#171717",TEXT_SECONDARY:"#a3a3a3",BG_SECONDARY:"#d4d4d4",BORDER:"#a3a3a3",SHADOW:"#a5f3fc",BACKGROUND_TRANSPARENT:"rgba(255, 255, 255, 0.5)"}};import{Fragment as Xo,jsx as F,jsxs as kt}from"react/jsx-runtime";var jo=Fo`
317
+ ${Ho}
318
+ * {
319
+ -webkit-font-smoothing: antialiased;
320
+ -moz-osx-font-smoothing: grayscale;
321
+ }
322
+ `,Be=zo(void 0);function Yo({children:e,theme:n="dark"}){if(!$e(_o))throw new Error("IndodaxKitProvider must be used within a WagmiProvider");if($e(Be))throw new Error("Multiple, nested usages of IndodaxKitProvider detected. Please use only one.");let t=Zo(),[o,r]=Ae(!1),[i,a]=Ae(null),[s,c]=Ae("");Vo(()=>{t.connectors.find(W=>W.id==="walletConnect")?.getProvider().then(W=>{c(W?.rpc?.projectId)})},[t.connectors]);let p=E=>{a(E),r(!0)},C=()=>{r(!1),a(null)},l=Lo(()=>{switch(i){case D.CONNECT:return re()?F(Ct,{}):F(ut,{});case D.CHAIN:return F(_e,{});case D.PROFILE:return F(wt,{});case null:return null;default:{let E=i;throw new Error(`Unhandled modal type: ${E}`)}}},[i]),d={modalOpen:o,openModal:p,closeModal:C,theme:n,walletConnectProjectId:s};return Oo(Be.Provider,{value:d},kt(Xo,{children:[F(jo,{}),kt(Uo,{theme:n==="dark"?de:It,children:[e,F(Pt,{isOpen:o,onClose:C,children:l})]})]}))}function $(){let e=$e(Be);if(!e)throw new Error("useXellarKit must be used within a IndodaxKitProvider");return e}import{Fragment as tn,jsx as on}from"react/jsx-runtime";var Ne=({children:e})=>{let{openModal:n}=$(),{address:t,isConnected:o}=Ko(),{disconnect:r}=en(),i=qo(),s=Jo().find(d=>d.id===i),{data:c}=Qo({address:t}),p=()=>{n(D.CONNECT)},C=()=>{n(D.CHAIN)},l=()=>{n(D.PROFILE)};return on(tn,{children:e({isConnected:o,account:t?{address:t,balanceDecimals:c?.decimals,balanceFormatted:c?.formatted,balanceSymbol:c?.symbol}:void 0,disconnect:r,chain:s,openConnectModal:p,openChainModal:C,openProfileModal:l})})};import{jsx as Ge,jsxs as Mt}from"react/jsx-runtime";function St({className:e}){return Ge(Ne,{children:({isConnected:n,account:t,openConnectModal:o,openChainModal:r,chain:i,openProfileModal:a})=>{let s=t?.balanceFormatted?`${Ve(Number.parseFloat(t.balanceFormatted))} ${t.balanceSymbol}`:void 0;return!n&&!t?Ge(R,{className:e,onClick:o,children:"Connect"}):Mt(rn,{className:e,children:[Ge(R,{onClick:r,children:i?.name}),Mt(R,{onClick:a,children:[s," | ",X(t?.address??"")]})]})}})}St.Custom=Ne;var rn=nn.div`
323
+ display: flex;
324
+ flex-direction: row;
325
+ align-items: center;
326
+ gap: 8px;
327
+ `;import{createConfig as un}from"wagmi";import{arbitrum as Cn,mainnet as xn,optimism as wn,polygon as yn}from"wagmi/chains";import{injected as cn}from"wagmi";import{createConnector as an}from"wagmi";import{walletConnect as sn}from"wagmi/connectors";var Wt=new Map,ln=({projectId:e,walletConnectParameters:n,showQrModal:t})=>{let o={...n||{},projectId:e,showQrModal:!1};t&&(o={...o,showQrModal:!0});let r=JSON.stringify(o),i=Wt.get(r);if(i)return i;let a=sn(o);return Wt.set(r,a),a};function me({projectId:e,walletConnectParameters:n,showQrModal:t,id:o,name:r,mobileUrl:i,desktopUrl:a}){return an(s=>({...ln({projectId:e,walletConnectParameters:n,showQrModal:t})(s),id:o,name:r,mobileUrl:i,desktopUrl:a}))}var ze={explorerRecommendedWalletIds:["7819f9cd07e8d7101a483087869f1e57b7d448f3ec5f4ef3eda63c19b926dc17"],explorerExcludedWalletIds:"ALL"},Rt=e=>[me({projectId:e.projectId,walletConnectParameters:{qrModalOptions:ze},showQrModal:!1,id:"indodax",name:"Indodax"}),me({projectId:e.projectId,walletConnectParameters:{qrModalOptions:ze},showQrModal:!1,id:"reown",name:"Reown"}),me({projectId:e.projectId,walletConnectParameters:{qrModalOptions:ze},showQrModal:!1,id:"walletConnect",name:"WalletConnect"})];var Tt=({app:e,walletConnectProjectId:n})=>{let t=[];return t.push(cn({target:"metaMask"})),n&&t.push(...Rt({projectId:n,...e??{}})),t};import{fallback as pn,http as dn}from"wagmi";import{arbitrum as mn,mainnet as fn,optimism as hn,polygon as gn}from"wagmi/chains";var Et=({chains:e=[fn,gn,hn,mn]})=>{let n={};return e.forEach(t=>{let o=[];o.push(dn()),n[t.id]=pn(o)}),n};var bn=({appName:e="Xellar Kit",appIcon:n,appDescription:t,appUrl:o,walletConnectProjectId:r,...i})=>{let{transports:a,chains:s,...c}=i,p=s||[xn,yn,wn,Cn],C=Tt({app:{name:e,icon:n,description:t,url:o},walletConnectProjectId:r}),l=a||Et({chains:s});return un({chains:p,connectors:C,transports:l,...c})};export{St as ConnectButton,Yo as IndodaxKitProvider,bn as defaultConfig};
328
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/connect-button/connect-button.tsx","../src/utils/string.ts","../src/components/ui/button.tsx","../src/components/connect-button/abbreviate-balance.ts","../src/components/connect-button/connect-button-renderer.tsx","../src/constants/modal.ts","../src/providers/indodax-kit.tsx","../src/components/dialog/content/chain-dialog/chain-dialog.tsx","../src/assets/spinner.tsx","../src/components/dialog/content/styled.ts","../src/components/dialog/content/connect-dialog.tsx","../src/hooks/use-wallet-connection.ts","../src/utils/is-mobile.ts","../src/hooks/connectors.ts","../src/assets/generic-wallet.tsx","../src/assets/indodax.tsx","../src/assets/metamask.tsx","../src/assets/reown-light.tsx","../src/assets/wallet-connect.tsx","../src/wallets/wallet-config.tsx","../src/wallets/use-wallet.tsx","../src/assets/socials.tsx","../src/components/dialog/content/passport-content/styled.ts","../src/components/dialog/content/passport-content/passport-content.tsx","../src/components/dialog/content/wallet-connect/wallet-connect.tsx","../src/assets/copy-icon.tsx","../src/components/qr-code/qr-code.tsx","../src/components/dialog/content/connect-dialog-mobile.tsx","../src/components/dialog/content/profile-dialog/profile-dialog.tsx","../src/components/dialog/dialog.tsx","../src/styles/theme.ts","../src/config/default-config.ts","../src/config/connectors.ts","../src/wallets/get-wc-connector.ts","../src/wallets/wallets.ts","../src/config/default-transport.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { truncateAddress } from '@/utils/string';\n\nimport { StyledButton } from '../ui/button';\nimport { abbreviateETHBalance } from './abbreviate-balance';\nimport { ConnectButtonRenderer } from './connect-button-renderer';\n\nexport interface ConnectButtonProps {\n className?: string;\n}\n\nexport function ConnectButton({ className }: ConnectButtonProps) {\n return (\n <ConnectButtonRenderer>\n {({\n isConnected,\n account,\n openConnectModal,\n openChainModal,\n chain,\n openProfileModal\n }) => {\n const displayBalance = account?.balanceFormatted\n ? `${abbreviateETHBalance(Number.parseFloat(account.balanceFormatted))} ${account.balanceSymbol}`\n : undefined;\n\n return !isConnected && !account ? (\n <StyledButton className={className} onClick={openConnectModal}>\n Connect\n </StyledButton>\n ) : (\n <Row className={className}>\n <StyledButton onClick={openChainModal}>{chain?.name}</StyledButton>\n <StyledButton onClick={openProfileModal}>\n {displayBalance} | {truncateAddress(account?.address ?? '')}\n </StyledButton>\n </Row>\n );\n }}\n </ConnectButtonRenderer>\n );\n}\n\nConnectButton.Custom = ConnectButtonRenderer;\n\nconst Row = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n`;\n","export const truncateAddress = (address: string) => {\n return `${address.slice(0, 6)}...${address.slice(-4)}`;\n};\n","import styled from 'styled-components';\n\nexport const StyledButton = styled.div`\n background-color: ${({ theme }) => theme.colors.PRIMARY};\n color: #fff;\n padding: 10px 20px;\n border-radius: 5px;\n border: none;\n cursor: pointer;\n text-align: center;\n`;\n\nStyledButton.defaultProps = {\n role: 'button'\n};\n","/**\n * Adapted from https://github.com/domharrington/js-number-abbreviate\n */\nconst units = ['k', 'm', 'b', 't'];\n\nexport function toPrecision(number: number, precision = 1) {\n return number\n .toString()\n .replace(new RegExp(`(.+\\\\.\\\\d{${precision}})\\\\d+`), '$1')\n .replace(/(\\.[1-9]*)0+$/, '$1')\n .replace(/\\.$/, '');\n}\n\nexport function abbreviateETHBalance(number: number): string {\n // Handle very small numbers (less than 1e-6)\n if (number < 1e-6) {\n // Format to 2 significant digits for very small numbers\n return number.toFixed(9).replace(/\\.?0+$/, '');\n }\n\n if (number < 1) return toPrecision(number, 3);\n if (number < 10 ** 2) return toPrecision(number, 2);\n if (number < 10 ** 4)\n return new Intl.NumberFormat().format(\n Number.parseFloat(toPrecision(number, 1))\n );\n\n const decimalsDivisor = 10 ** 1; // 1 decimal place\n\n let result = String(number);\n\n for (let i = units.length - 1; i >= 0; i--) {\n const size = 10 ** ((i + 1) * 3);\n\n if (size <= number) {\n number = (number * decimalsDivisor) / size / decimalsDivisor;\n\n result = toPrecision(number, 1) + units[i];\n\n break;\n }\n }\n\n return result;\n}\n","import { Chain } from 'viem';\nimport {\n useAccount,\n useBalance,\n useChainId,\n useChains,\n useDisconnect\n} from 'wagmi';\n\nimport { MODAL_TYPE } from '@/constants/modal';\nimport { useXellarContext } from '@/providers/indodax-kit';\n\nexport interface ConnectButtonRendererProps {\n children: (props: {\n isConnected: boolean;\n account?: {\n address: `0x${string}`;\n balanceDecimals?: number;\n balanceFormatted?: string;\n balanceSymbol?: string;\n };\n chain?: Chain;\n disconnect: () => void;\n openConnectModal: () => void;\n openChainModal: () => void;\n openProfileModal: () => void;\n }) => React.ReactNode;\n}\n\nexport const ConnectButtonRenderer = ({\n children\n}: ConnectButtonRendererProps) => {\n const { openModal } = useXellarContext();\n const { address, isConnected } = useAccount();\n const { disconnect } = useDisconnect();\n const chainId = useChainId();\n const chains = useChains();\n\n const chain = chains.find(chain => chain.id === chainId);\n\n const { data: balance } = useBalance({\n address\n });\n\n const openConnectModal = () => {\n openModal(MODAL_TYPE.CONNECT);\n };\n\n const openChainModal = () => {\n openModal(MODAL_TYPE.CHAIN);\n };\n\n const openProfileModal = () => {\n openModal(MODAL_TYPE.PROFILE);\n };\n\n return (\n <>\n {children({\n isConnected,\n account: address\n ? {\n address,\n balanceDecimals: balance?.decimals,\n balanceFormatted: balance?.formatted,\n balanceSymbol: balance?.symbol\n }\n : undefined,\n disconnect,\n chain: chain,\n openConnectModal,\n openChainModal,\n openProfileModal\n })}\n </>\n );\n};\n","export const MODAL_TYPE = {\n CONNECT: 'connect',\n CHAIN: 'chain',\n PROFILE: 'profile'\n} as const;\n\nexport type ModalType = (typeof MODAL_TYPE)[keyof typeof MODAL_TYPE];\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, {\n createContext,\n createElement,\n PropsWithChildren,\n useContext,\n useEffect,\n useMemo,\n useState\n} from 'react';\nimport { createGlobalStyle, ThemeProvider } from 'styled-components';\nimport { reset } from 'styled-reset';\nimport { useConfig, WagmiContext } from 'wagmi';\n\nimport { ChainDialogContent } from '@/components/dialog/content/chain-dialog/chain-dialog';\nimport { ConnectDialogContent } from '@/components/dialog/content/connect-dialog';\nimport { ConnectDialogMobileContent } from '@/components/dialog/content/connect-dialog-mobile';\nimport { ProfileDialogContent } from '@/components/dialog/content/profile-dialog/profile-dialog';\nimport { Dialog } from '@/components/dialog/dialog';\nimport { MODAL_TYPE, ModalType } from '@/constants/modal';\nimport { defaultTheme, lightTheme } from '@/styles/theme';\nimport { isMobile } from '@/utils/is-mobile';\n\nconst GlobalStyle = createGlobalStyle`\n ${reset}\n * {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n`;\n\ninterface XellarKitContextType {\n modalOpen: boolean;\n openModal: (type: ModalType) => void;\n closeModal: () => void;\n theme: 'dark' | 'light';\n walletConnectProjectId: string;\n}\n\nconst XellarKitContext = createContext<XellarKitContextType>(\n undefined as never\n);\n\nexport function IndodaxKitProvider({\n children,\n theme = 'dark'\n}: PropsWithChildren<{\n theme?: 'dark' | 'light';\n}>) {\n if (!useContext(WagmiContext)) {\n throw new Error('IndodaxKitProvider must be used within a WagmiProvider');\n }\n\n if (useContext(XellarKitContext)) {\n throw new Error(\n 'Multiple, nested usages of IndodaxKitProvider detected. Please use only one.'\n );\n }\n\n // Get the config from Wagmi\n const config = useConfig();\n\n const [modalOpen, setModalOpen] = useState(false);\n const [modalType, setModalType] = useState<ModalType | null>(null);\n const [wcProjectId, setWcProjectId] = useState('');\n\n useEffect(() => {\n const wcConnector = config.connectors.find(c => c.id === 'walletConnect');\n wcConnector?.getProvider().then((p: any) => {\n setWcProjectId(p?.rpc?.projectId);\n });\n }, [config.connectors]);\n\n const handleOpenModal = (type: ModalType) => {\n setModalType(type);\n setModalOpen(true);\n };\n\n const handleCloseModal = () => {\n setModalOpen(false);\n setModalType(null);\n };\n\n const modalContent = useMemo(() => {\n switch (modalType) {\n case MODAL_TYPE.CONNECT:\n if (isMobile()) {\n return <ConnectDialogMobileContent />;\n }\n return <ConnectDialogContent />;\n case MODAL_TYPE.CHAIN:\n return <ChainDialogContent />;\n case MODAL_TYPE.PROFILE:\n return <ProfileDialogContent />;\n case null:\n return null;\n default: {\n const _exhaustiveCheck: never = modalType;\n throw new Error(`Unhandled modal type: ${_exhaustiveCheck}`);\n }\n }\n }, [modalType]);\n\n const value = {\n modalOpen,\n openModal: handleOpenModal,\n closeModal: handleCloseModal,\n theme,\n walletConnectProjectId: wcProjectId\n };\n\n return createElement(\n XellarKitContext.Provider,\n { value },\n <>\n <GlobalStyle />\n <ThemeProvider theme={theme === 'dark' ? defaultTheme : lightTheme}>\n {children}\n <Dialog isOpen={modalOpen} onClose={handleCloseModal}>\n {modalContent}\n </Dialog>\n </ThemeProvider>\n </>\n );\n}\n\nexport function useXellarContext() {\n const context = useContext(XellarKitContext);\n if (!context) {\n throw new Error('useXellarKit must be used within a IndodaxKitProvider');\n }\n return context;\n}\n","import { useState } from 'react';\nimport styled from 'styled-components';\nimport { useChainId, useChains, useSwitchChain } from 'wagmi';\n\nimport { SpinnerIcon } from '@/assets/spinner';\n\nimport { Separator, Title } from '../styled';\n\nexport function ChainDialogContent() {\n const chains = useChains();\n const chainId = useChainId();\n const { switchChain, isPending } = useSwitchChain();\n\n const [selectedChain, setSelectedChain] = useState<number | null>(chainId);\n\n const handleSwitchChain = (chainIdToSwitch: number) => {\n setSelectedChain(chainIdToSwitch);\n switchChain(\n { chainId: chainIdToSwitch },\n {\n onError: () => {\n setSelectedChain(chainId);\n }\n }\n );\n };\n\n return (\n <Wrapper>\n <Title>Switch Chain</Title>\n <Separator />\n {chains.map(chain => (\n <ChainItem\n key={chain.id}\n selected={chain.id === selectedChain}\n onClick={() => handleSwitchChain(chain.id)}\n >\n <ChainName>{chain.name}</ChainName>\n {isPending && chain.id === selectedChain && <SpinnerIcon />}\n </ChainItem>\n ))}\n </Wrapper>\n );\n}\n\nconst Wrapper = styled.div`\n width: 280px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n`;\n\nexport const ChainItem = styled.div<{ selected?: boolean }>`\n height: 40px;\n transition: background-color 0.15s ease-in-out;\n border-radius: 8px;\n display: flex;\n padding: 0 8px;\n gap: 8px;\n flex-direction: row;\n align-items: center;\n cursor: pointer;\n color: ${({ theme, selected }) => (selected ? '#fff' : theme.colors.TEXT)};\n background-color: ${({ theme, selected }) =>\n selected ? theme.colors.PRIMARY : 'transparent'};\n &:hover {\n background-color: ${({ theme, selected }) =>\n selected ? theme.colors.PRIMARY : theme.colors.BG_SECONDARY};\n }\n`;\n\nconst ChainName = styled.span`\n font-size: 14px;\n font-weight: 400;\n flex: 1;\n`;\n","import { SVGProps } from 'react';\nimport styled from 'styled-components';\n\nexport const SpinnerIcon = (props: SVGProps<SVGSVGElement>) => (\n <StyledSpinner\n xmlns=\"http://www.w3.org/2000/svg\"\n width={16}\n height={16}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n className=\"lucide lucide-loader\"\n {...props}\n >\n <path d=\"M12 2v4M16.2 7.8l2.9-2.9M18 12h4M16.2 16.2l2.9 2.9M12 18v4M4.9 19.1l2.9-2.9M2 12h4M4.9 4.9l2.9 2.9\" />\n </StyledSpinner>\n);\n\nexport const StyledSpinner = styled.svg`\n @keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n animation: spin 2s linear infinite;\n`;\n","import { motion } from 'motion/react';\nimport styled from 'styled-components';\n\nexport const Wrapper = styled.div`\n display: flex;\n flex-direction: row;\n gap: 12px;\n overflow: hidden;\n height: 394px;\n`;\n\nexport const ConnectContentWrapper = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n padding-right: 8px;\n width: 320px;\n`;\n\nexport const InnerQRCodeWrapper = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex: 1;\n position: relative;\n\n svg {\n width: 100% !important;\n height: auto !important;\n }\n`;\n\nexport const Container = styled.div<{ $isMobile: boolean }>`\n width: ${({ $isMobile }) => ($isMobile ? '100%' : '280px')};\n display: flex;\n flex-direction: column;\n gap: 8px;\n`;\n\nexport const Icon = styled.img`\n width: 20px;\n height: 20px;\n`;\n\nexport const Separator = styled.div`\n width: 48px;\n height: 4px;\n background-color: ${({ theme }) => theme.colors.TEXT};\n margin-left: 8px;\n`;\n\nexport const Title = styled.h3`\n font-size: 18px;\n font-weight: 600;\n line-height: 24px;\n margin-left: 8px;\n`;\n\nexport const Description = styled.p`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n margin-left: 8px;\n max-width: 250px;\n font-weight: 500;\n margin: 8px 0 8px 8px;\n color: ${({ theme }) => theme.colors.TEXT_SECONDARY};\n`;\n\nexport const EmptyStateWrapper = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n`;\n\nexport const AnimatedContainer = styled(motion.div)`\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n`;\n\nexport const TitleSpan = styled.span`\n color: ${({ theme }) => theme.colors.PRIMARY_ACCENT};\n`;\n\nexport const WalletItem = styled.div<{ selected?: boolean }>`\n height: 40px;\n transition: background-color 0.15s ease-in-out;\n border-radius: 8px;\n display: flex;\n padding: 0 8px;\n gap: 8px;\n flex-direction: row;\n align-items: center;\n cursor: pointer;\n color: ${({ theme, selected }) => (selected ? '#fff' : theme.colors.TEXT)};\n background-color: ${({ theme, selected }) =>\n selected ? theme.colors.PRIMARY : 'transparent'};\n &:hover {\n background-color: ${({ theme, selected }) =>\n selected ? theme.colors.PRIMARY : theme.colors.BG_SECONDARY};\n }\n`;\n\nWalletItem.defaultProps = {\n role: 'button'\n};\n\nexport const WalletName = styled.div`\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n font-weight: 600;\n flex: 1;\n`;\n\nexport const IconWrapper = styled.div<{ $size?: number; $br?: number }>`\n width: ${({ $size }) => $size || 28}px;\n height: ${({ $size }) => $size || 28}px;\n border: 1px solid ${({ theme }) => theme.colors.BORDER};\n background-color: ${({ theme }) => theme.colors.BACKGROUND};\n border-radius: ${({ $br }) => $br || 6}px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => theme.colors.TEXT};\n\n svg {\n width: 70% !important;\n height: auto !important;\n }\n`;\n","import { AnimatePresence } from 'motion/react';\nimport { useState } from 'react';\nimport styled from 'styled-components';\n\nimport { SpinnerIcon } from '@/assets/spinner';\nimport { useWalletConnection } from '@/hooks/use-wallet-connection';\nimport { useWallets } from '@/wallets/use-wallet';\n\nimport { PassportContent } from './passport-content/passport-content';\nimport {\n ConnectContentWrapper,\n Container,\n Description,\n EmptyStateWrapper,\n IconWrapper,\n Separator,\n Title,\n TitleSpan,\n WalletItem,\n WalletName,\n Wrapper\n} from './styled';\nimport { WalletConnectModalContent } from './wallet-connect/wallet-connect';\n\nexport function ConnectDialogContent() {\n const wallets = useWallets();\n\n const { wallet, setWallet, uri, isConnecting } = useWalletConnection();\n\n // const deeplink =\n // (!wallet?.isInstalled && isMobile) ||\n // (wallet?.shouldDeeplinkDesktop && !isMobile)\n // ? wallet?.getWalletConnectDeeplink?.(uri ?? '')\n // : undefined;\n\n const deeplink = wallet?.getBrowserDeeplink\n ? wallet?.getWalletConnectDeeplink?.(uri ?? '')\n : uri;\n\n // const redirectToMoreWallets = isMobile && isWalletConnectConnector(wallet.id);\n\n const browserUrl = uri ? wallet?.getBrowserDeeplink?.(uri) : null;\n\n const [showPassportContent] = useState(false);\n\n const renderContent = () => {\n if (showPassportContent) return <PassportContent />;\n\n // If MetaMask is selected but not installed, and we have a QR code URI\n if (wallet?.id.includes('metaMask') && !wallet.isInstalled && uri) {\n return (\n <WalletConnectModalContent\n isConnecting={isConnecting}\n uri={uri}\n wallet={wallet}\n rawUri={uri}\n browserUrl={browserUrl}\n />\n );\n }\n\n // If we have a deeplink (for other wallets) and wallet is selected\n if (deeplink && wallet && uri) {\n return (\n <WalletConnectModalContent\n isConnecting={isConnecting}\n uri={deeplink}\n wallet={wallet}\n rawUri={uri}\n browserUrl={browserUrl}\n />\n );\n }\n\n return (\n <EmptyStateWrapper>\n <Description style={{ textAlign: 'center' }}>\n Choose a wallet on the left to get started. Wallets let you send,\n receive, and store digital assets securely.\n </Description>\n </EmptyStateWrapper>\n );\n };\n\n return (\n <Wrapper>\n <Container $isMobile={false}>\n <Title>\n Connect <TitleSpan>Wallet</TitleSpan>\n </Title>\n <Separator />\n\n <Description>\n Wallets are used to send, receive, store, and display digital assets\n like Ethereum and NFTs.\n </Description>\n\n <ConnectorList>\n {wallets.map(_wallet => {\n return (\n <WalletItem\n key={_wallet.id}\n onClick={() => {\n setWallet(_wallet);\n }}\n selected={_wallet.id === wallet?.id}\n >\n <IconWrapper>{_wallet.icon}</IconWrapper>\n <WalletName>{_wallet.name}</WalletName>\n {_wallet.id === wallet?.id && isConnecting && <SpinnerIcon />}\n </WalletItem>\n );\n })}\n </ConnectorList>\n </Container>\n\n <ConnectContentWrapper>\n <AnimatePresence mode=\"wait\">{renderContent()}</AnimatePresence>\n </ConnectContentWrapper>\n </Wrapper>\n );\n}\n\nconst ConnectorList = styled.div`\n overflow-y: auto;\n`;\n\n/* <WalletItem\n selected={showPassportContent}\n onClick={() => {\n setShowPassportContent(true);\n setUri(null);\n }}\n >\n <IconWrapper>\n {theme === 'light' ? <XellarDark /> : <XellarLight />}\n </IconWrapper>\n <WalletName>Xellar Passport</WalletName>\n </WalletItem> */\n","import { useEffect, useRef, useState } from 'react';\nimport { Connector, CreateConnectorFn, useConnect } from 'wagmi';\nimport { walletConnect } from 'wagmi/connectors';\n\nimport { useXellarContext } from '@/providers/indodax-kit';\nimport { isMobile, isMobileDevice } from '@/utils/is-mobile';\nimport { WalletProps } from '@/wallets/use-wallet';\n\nimport { useConnector } from './connectors';\n\nexport function useWalletConnection() {\n const { closeModal, walletConnectProjectId } = useXellarContext();\n const [wallet, setWallet] = useState<WalletProps | null>(null);\n const wcConnector = useConnector('walletConnect');\n\n const [uri, setUri] = useState<string | null>(null);\n const [isConnecting, setIsConnecting] = useState(false);\n const { connectAsync } = useConnect();\n\n const getWalletConnectUri = async (connector: Connector): Promise<string> => {\n const provider = await connector.getProvider();\n\n return new Promise<string>(resolve =>\n // Wagmi v2 doesn't have a return type for provider yet\n // @ts-expect-error Provider type not yet defined\n provider.once('display_uri', _uri => {\n resolve(_uri);\n })\n );\n };\n\n const onQrCode = async (connector: Connector) => {\n const _uri = await getWalletConnectUri(connector);\n setUri(_uri);\n setIsConnecting(false);\n };\n\n const onWalletConnect = async (wallet: WalletProps) => {\n const _connector = wallet.connector;\n console.log(typeof wallet.getWalletConnectDeeplink);\n\n if (wallet.getWalletConnectDeeplink) {\n return;\n }\n\n const w3mcss = document.createElement('style');\n w3mcss.innerHTML = `w3m-modal, wcm-modal{ --wcm-z-index: 2147483647; --w3m-z-index:2147483647; }`;\n document.head.appendChild(w3mcss);\n\n let cn: CreateConnectorFn | Connector = _connector;\n if (walletConnectProjectId && wallet.id !== 'indodax') {\n cn = walletConnect({\n projectId: walletConnectProjectId,\n showQrModal: true\n });\n }\n\n if (isMobileDevice()) {\n onQrCode(_connector);\n }\n\n try {\n await connectAsync({ connector: cn });\n } catch (err) {\n console.error('WalletConnect', err);\n }\n // remove modal styling\n document.head.removeChild(w3mcss);\n };\n\n const selectWallet = async (wallet: WalletProps) => {\n console.log({ wallet });\n\n if (isMobileDevice()) {\n onWalletConnect(wallet);\n }\n\n if (wallet.connector.type !== 'injected' && !uri) {\n onQrCode(wallet.connector);\n }\n\n if (wallet.connector.type === 'injected') {\n // If it's MetaMask and not installed, we should use WalletConnect instead\n if (wallet.id.includes('metaMask') && !wallet.isInstalled) {\n try {\n if (!uri) {\n setIsConnecting(true);\n onQrCode(wcConnector);\n }\n await connectAsync({\n connector: wcConnector\n });\n setIsConnecting(false);\n setWallet(null);\n closeModal();\n } catch (error) {\n console.error('WalletConnect error:', error);\n setIsConnecting(false);\n setWallet(null);\n }\n setIsConnecting(false);\n return;\n }\n\n setUri(null);\n }\n\n if (!uri) {\n setIsConnecting(true);\n }\n wallet.connector\n .connect()\n .then(acccount => {\n if (acccount.accounts.length > 0) {\n setIsConnecting(false);\n setWallet(null);\n closeModal();\n }\n })\n .catch(error => {\n console.error(error);\n setIsConnecting(false);\n setWallet(null);\n });\n };\n\n const selectWalletRef = useRef(selectWallet);\n selectWalletRef.current = selectWallet;\n\n useEffect(() => {\n if (wallet) {\n selectWalletRef.current(wallet);\n }\n }, [wallet]);\n\n return {\n wallet,\n setWallet,\n uri,\n setUri,\n isConnecting: isConnecting,\n setIsConnecting,\n onWalletConnect\n };\n}\n","export function isAndroid(): boolean {\n return (\n typeof navigator !== 'undefined' && /android/i.test(navigator.userAgent)\n );\n}\n\nexport function isSmallIOS(): boolean {\n return (\n typeof navigator !== 'undefined' && /iPhone|iPod/.test(navigator.userAgent)\n );\n}\n\nexport function isLargeIOS(): boolean {\n return (\n typeof navigator !== 'undefined' &&\n (/iPad/.test(navigator.userAgent) ||\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1))\n );\n}\n\nexport function isIOS(): boolean {\n return isSmallIOS() || isLargeIOS();\n}\n\nexport function isMobileDevice(): boolean {\n return isAndroid() || isIOS();\n}\n\nexport function isMobile(): boolean {\n return typeof window !== 'undefined' && window.innerWidth < 680;\n}\n","import { Connector, useConnectors as useWagmiConnectors } from 'wagmi';\n\nexport function useConnectors() {\n const wagmiConnectors = useWagmiConnectors();\n\n const connectors = wagmiConnectors || [];\n\n return [\n ...connectors.filter(c => c.id === 'indodax'),\n ...connectors.filter(c => c.id !== 'indodax')\n ]\n .filter(\n (wallet, index, self) =>\n !(\n (wallet.id === 'metaMaskSDK' || wallet.id === 'metaMask') &&\n self.find(\n w => w.id === 'io.metamask' || w.id === 'io.metamask.mobile'\n )\n )\n )\n .sort((a, b) => {\n if (a.type === 'injected' && b.type !== 'injected') return -1;\n if (a.type !== 'injected' && b.type === 'injected') return 1;\n return 0;\n });\n}\n\nexport function useConnector(id: string, uuid?: string) {\n const connectors = useConnectors();\n if (id === 'injected' && uuid) {\n return connectors.find(c => c.id === id && c.name === uuid) as Connector;\n }\n\n if (id === 'injected') {\n return connectors.find(\n c => c.id === id && c.name.includes('Injected')\n ) as Connector;\n }\n\n return connectors.find(c => c.id === id) as Connector;\n}\n\nexport function useInjectedConnectors() {\n const connectors = useConnectors();\n\n const injectedConnectors = connectors\n .filter(w => w.type === 'injected')\n .filter(\n (wallet, index, self) =>\n !(\n (wallet.id === 'metaMaskSDK' || wallet.id === 'metaMask') &&\n self.find(\n w => w.id === 'io.metamask' || w.id === 'io.metamask.mobile'\n )\n )\n );\n\n return injectedConnectors;\n}\n\nexport function useWalletConnectConnector() {\n return useConnector('walletConnect');\n}\n","import * as React from 'react';\nimport { SVGProps } from 'react';\nexport const GenericWalletIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={20}\n height={20}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n className=\"icon icon-tabler icons-tabler-outline icon-tabler-wallet\"\n {...props}\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" />\n <path d=\"M17 8V5a1 1 0 0 0-1-1H6a2 2 0 0 0 0 4h12a1 1 0 0 1 1 1v3m0 4v3a1 1 0 0 1-1 1H6a2 2 0 0 1-2-2V6\" />\n <path d=\"M20 12v4h-4a2 2 0 0 1 0-4h4\" />\n </svg>\n);\n","import * as React from 'react';\nimport { SVGProps } from 'react';\n\nexport const IndodaxIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={20}\n height={20}\n viewBox=\"0 0 255 200\"\n fill=\"none\"\n {...props}\n >\n <g clipPath=\"url(#a)\">\n <path\n fill=\"#0F9DCE\"\n fillRule=\"evenodd\"\n d=\"m231.507 39.263-17.272-16.724-67.972 65.667h-67.23L39.23 49.566a11.4 11.4 0 0 1-3.013-.755 11.057 11.057 0 0 1-4.991-3.973 10.562 10.562 0 0 1-1.875-5.995c0-2.862 1.172-5.606 3.258-7.63 2.086-2.023 4.915-3.16 7.865-3.16 2.2 0 4.35.633 6.18 1.819a10.869 10.869 0 0 1 4.096 4.842c.59 1.383.875 2.864.844 4.346l34.638 33.111h53.543L214.235 0l40.443 39.263-77.24 74.929 36.335 35.247c2.135.036 4.216.666 5.993 1.817a10.868 10.868 0 0 1 4.097 4.842 10.502 10.502 0 0 1 .633 6.235 10.699 10.699 0 0 1-3.044 5.524 11.235 11.235 0 0 1-5.695 2.953 11.44 11.44 0 0 1-6.426-.614 11.058 11.058 0 0 1-4.992-3.974 10.569 10.569 0 0 1-1.845-5.199l-48.167-47.131 77.242-74.63h-.062ZM77.581 91.983h16.498l-70.845 68.754 17.24 16.755 67.694-65.668h38.126l67.972 65.668 17.272-16.755-36.259-34.887a11.442 11.442 0 0 1-4.111-.818 11.055 11.055 0 0 1-4.996-3.974 10.562 10.562 0 0 1-1.877-5.997c0-2.856 1.168-5.596 3.248-7.619 2.078-2.023 4.9-3.163 7.844-3.171a11.37 11.37 0 0 1 6.188 1.804 10.873 10.873 0 0 1 4.11 4.836c.419.975.686 2 .797 3.039l48.351 46.817L214.235 200l-74.46-72.142H114.78L40.474 200 0 160.737l62.534-60.722L0 39.263 40.474 0l50.694 49.177c1.81.175 3.552.779 5.074 1.765a10.874 10.874 0 0 1 4.097 4.842 10.482 10.482 0 0 1 .632 6.234 10.684 10.684 0 0 1-3.043 5.525 11.235 11.235 0 0 1-5.696 2.953 11.44 11.44 0 0 1-6.426-.614 11.056 11.056 0 0 1-4.992-3.974 10.566 10.566 0 0 1-1.873-5.825L40.474 22.539l-17.24 16.724 54.347 52.72Zm-25.973 69.212 54.583-53.298h49.032l58.947-57.415c.5-.03.999-.092 1.494-.187a11.233 11.233 0 0 0 5.695-2.953 10.696 10.696 0 0 0 3.044-5.525 10.49 10.49 0 0 0-.632-6.234 10.865 10.865 0 0 0-4.098-4.842 11.366 11.366 0 0 0-6.179-1.819c-2.95 0-5.779 1.137-7.865 3.16-2.01 1.95-3.171 4.57-3.253 7.317l-54.475 52.584H99.61l-59.048 57.396h-.026c-2.95 0-5.78 1.136-7.865 3.16-2.086 2.024-3.258 4.768-3.258 7.629 0 2.135.652 4.221 1.875 5.995a11.062 11.062 0 0 0 4.991 3.974 11.442 11.442 0 0 0 6.427.614 11.23 11.23 0 0 0 5.694-2.953 10.697 10.697 0 0 0 3.044-5.524c.074-.358.128-.718.164-1.079Z\"\n clipRule=\"evenodd\"\n />\n </g>\n <defs>\n <clipPath id=\"a\">\n <path fill=\"#fff\" d=\"M0 0h254.833v200H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import { SVGProps } from 'react';\n\nexport const MetaMaskIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlSpace=\"preserve\"\n id=\"Layer_1\"\n x={0}\n y={0}\n viewBox=\"0 0 318.6 318.6\"\n width={20}\n height={20}\n {...props}\n >\n <style>\n {\n '.st1,.st2,.st3,.st4,.st5,.st6,.st9{fill:#e4761b;stroke:#e4761b;stroke-linecap:round;stroke-linejoin:round}.st2,.st3,.st4,.st5,.st6,.st9{fill:#d7c1b3;stroke:#d7c1b3}.st3,.st4,.st5,.st6,.st9{fill:#233447;stroke:#233447}.st4,.st5,.st6,.st9{fill:#cd6116;stroke:#cd6116}.st5,.st6,.st9{fill:#e4751f;stroke:#e4751f}.st6,.st9{fill:#f6851b;stroke:#f6851b}.st9{fill:#763d16;stroke:#763d16}'\n }\n </style>\n <path\n d=\"m274.1 35.5-99.5 73.9L193 65.8z\"\n style={{\n fill: '#e2761b',\n stroke: '#e2761b',\n strokeLinecap: 'round',\n strokeLinejoin: 'round'\n }}\n />\n <path\n d=\"m44.4 35.5 98.7 74.6-17.5-44.3zM238.3 206.8l-26.5 40.6 56.7 15.6 16.3-55.3zM33.9 207.7 50.1 263l56.7-15.6-26.5-40.6z\"\n className=\"st1\"\n />\n <path\n d=\"m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zM214.9 138.2l-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zM177.9 230.9l33.9 16.5-4.7-39.3z\"\n className=\"st1\"\n />\n <path\n d=\"m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zM106.8 247.4l31.5 14.9-.2-9.3 2.5-22.1z\"\n className=\"st2\"\n />\n <path\n d=\"m138.8 193.5-28.2-8.3 19.9-9.1zM179.7 193.5l8.3-17.4 20 9.1z\"\n className=\"st3\"\n />\n <path\n d=\"m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zM230.8 162.1l-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zM110.6 185.2l20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z\"\n className=\"st4\"\n />\n <path\n d=\"m87.8 162.1 23.6 46-.8-22.9zM208.1 185.2l-1 22.9 23.7-46zM144.1 164.6l-5.3 28.9 6.6 34.1 1.5-44.9zM174.6 164.6l-2.7 18 1.2 45 6.7-34.1z\"\n className=\"st5\"\n />\n <path\n d=\"m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zM110.6 185.2l.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z\"\n className=\"st6\"\n />\n <path\n d=\"m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z\"\n style={{\n fill: '#c0ad9e',\n stroke: '#c0ad9e',\n strokeLinecap: 'round',\n strokeLinejoin: 'round'\n }}\n />\n <path\n d=\"m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z\"\n style={{\n fill: '#161616',\n stroke: '#161616',\n strokeLinecap: 'round',\n strokeLinejoin: 'round'\n }}\n />\n <path\n d=\"m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z\"\n className=\"st9\"\n />\n <path\n d=\"m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zM103.6 138.2l-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zM174.6 164.6l3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z\"\n className=\"st6\"\n />\n </svg>\n);\n","import * as React from 'react';\nimport { SVGProps } from 'react';\n\nexport const ReownLightIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={20}\n height={20}\n viewBox=\"0 0 178 112\"\n fill=\"none\"\n {...props}\n >\n <g clipPath=\"url(#a)\">\n <path\n fill=\"#fff\"\n d=\"M65.333 32.667C65.333 14.625 79.958 0 98 0h46.666c18.042 0 32.667 14.625 32.667 32.667v46.666c0 18.042-14.625 32.667-32.667 32.667H98c-18.042 0-32.667-14.625-32.667-32.667V32.667Z\"\n />\n <path\n fill=\"#202020\"\n d=\"m109.238 77 16.376-44.333h4.806L114.047 77h-4.809Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M0 30.333C0 13.58 13.58 0 30.333 0c16.754 0 30.334 13.58 30.334 30.333v51.334C60.667 98.42 47.087 112 30.333 112 13.58 112 0 98.42 0 81.667V30.333Z\"\n />\n <path fill=\"#202020\" d=\"M27.417 69.998v-5.833h5.833v5.833h-5.833Z\" />\n </g>\n <defs>\n <clipPath id=\"a\">\n <path fill=\"#fff\" d=\"M0 0h177.333v112H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import { SVGProps } from 'react';\n\nexport const WalletConnectIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={20}\n height={20}\n viewBox=\"0 0 480 332\"\n fill=\"none\"\n {...props}\n >\n <path\n fill=\"#3396ff\"\n d=\"M126.613 93.984c62.622-61.312 164.152-61.312 226.775 0l7.536 7.379a7.735 7.735 0 0 1 0 11.102l-25.781 25.242a4.07 4.07 0 0 1-5.67 0l-10.371-10.154c-43.687-42.773-114.517-42.773-158.204 0l-11.107 10.874a4.069 4.069 0 0 1-5.669 0l-25.781-25.242a7.733 7.733 0 0 1 0-11.102zm280.093 52.204 22.946 22.465a7.735 7.735 0 0 1 0 11.102L326.189 281.056c-3.131 3.065-8.208 3.065-11.339 0l-73.432-71.896a2.034 2.034 0 0 0-2.835 0l-73.43 71.896c-3.131 3.065-8.208 3.065-11.339 0L50.348 179.754a7.735 7.735 0 0 1 0-11.102l22.946-22.466c3.131-3.065 8.208-3.065 11.339 0l73.433 71.897a2.033 2.033 0 0 0 2.834 0l73.429-71.897c3.131-3.065 8.208-3.065 11.339 0l73.433 71.897a2.034 2.034 0 0 0 2.835 0l73.431-71.895c3.132-3.066 8.208-3.066 11.339 0z\"\n />\n </svg>\n);\n","import { GenericWalletIcon } from '@/assets/generic-wallet';\nimport { IndodaxIcon } from '@/assets/indodax';\nimport { MetaMaskIcon } from '@/assets/metamask';\nimport { ReownLightIcon } from '@/assets/reown-light';\nimport { WalletConnectIcon } from '@/assets/wallet-connect';\nimport { isAndroid, isIOS } from '@/utils/is-mobile';\n\n/**\n * EIP-6963: Multi Injected Provider Discovery\n * https://eips.ethereum.org/EIPS/eip-6963\n *\n */\nexport type WalletConfigProps = {\n // Wallets name\n name?: string;\n // Wallets short name. Defaults to `name`\n shortName?: string;\n // Icon to display in the modal\n icon?: string | React.ReactNode;\n // Icon to use on the wallet list button. If not provided, `icon` will be used\n iconConnector?: React.ReactNode;\n\n // Defaults to `false`, but some icons don't have a background and look better if they shrink to fit the container\n iconShouldShrink?: boolean;\n // Links to download the wallet\n downloadUrls?: {\n // Download redirect, hosted by Family.co\n // This URL redirects to the correct download URL based on the user's device\n // Note: this will eventually be automated by the below data\n download?: string;\n // wallet's website\n website?: string;\n // app downloads\n desktop?: string;\n android?: string;\n ios?: string;\n // browser extensions\n chrome?: string;\n firefox?: string;\n brave?: string;\n edge?: string;\n safari?: string;\n };\n // Create URI for QR code, where uri is encoded data from WalletConnect\n getWalletConnectDeeplink?: (uri: string) => string;\n getBrowserDeeplink?: (uri: string) => string;\n shouldDeeplinkDesktop?: boolean;\n};\n\n// Organised in alphabetical order by key\nexport const walletConfigs: {\n [rdns: string]: WalletConfigProps; // for multiple cases seperate rdns by comma\n} = {\n injected: {\n name: 'Browser Wallet',\n shortName: 'Browser',\n icon: <GenericWalletIcon />\n },\n indodax: {\n name: 'Indodax',\n shortName: 'Indodax',\n icon: <IndodaxIcon />,\n iconConnector: <IndodaxIcon />,\n getWalletConnectDeeplink: (uri: string) =>\n isAndroid() ? uri : `indodaxweb3://wc/${encodeURIComponent(uri)}`,\n getBrowserDeeplink: (uri: string) =>\n `https://indodaxwebapp.xellar.co/connections/add?uri=${encodeURIComponent(uri)}`\n },\n 'metaMask, metaMask-io, io.metamask, io.metamask.mobile, metaMaskSDK': {\n name: 'MetaMask',\n icon: <MetaMaskIcon />,\n iconConnector: <MetaMaskIcon />,\n iconShouldShrink: true,\n downloadUrls: {\n download: 'https://connect.family.co/v0/download/metamask',\n website: 'https://metamask.io/download/',\n android: 'https://play.google.com/store/apps/details?id=io.metamask',\n ios: 'https://apps.apple.com/app/metamask/id1438144202',\n chrome:\n 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn',\n firefox: 'https://addons.mozilla.org/firefox/addon/ether-metamask/',\n brave:\n 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn',\n edge: 'https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm'\n },\n getWalletConnectDeeplink: (uri: string) => {\n return isAndroid()\n ? uri\n : isIOS()\n ? // currently broken in MetaMask v6.5.0 https://github.com/MetaMask/metamask-mobile/issues/6457\n `metamask://wc?uri=${encodeURIComponent(uri)}`\n : `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}`;\n }\n },\n 'app.phantom': {\n name: 'Phantom'\n },\n reown: {\n name: 'Reown',\n shortName: 'Reown',\n icon: <ReownLightIcon />,\n iconConnector: <ReownLightIcon />\n },\n walletConnect: {\n name: 'WalletConnect',\n shortName: 'WalletConnect',\n icon: <WalletConnectIcon />,\n iconConnector: <WalletConnectIcon />\n }\n} as const;\n","import { Connector } from 'wagmi';\n\nimport { useConnectors } from '@/hooks/connectors';\n\nimport { WalletConfigProps, walletConfigs } from './wallet-config';\n\nexport const isInjectedConnector = (connectorId?: string) =>\n connectorId === 'injected';\n\nexport const isCoinbaseWalletConnector = (connectorId?: string) =>\n connectorId === 'coinbaseWalletSDK';\n\nexport type WalletProps = {\n id: string;\n connector: Connector;\n isInstalled?: boolean;\n} & WalletConfigProps;\n\nexport const useWallet = (id: string): WalletProps | null => {\n const wallets = useWallets();\n const wallet = wallets.find(c => c.id === id);\n if (!wallet) return null;\n return wallet;\n};\nexport const useWallets = (): WalletProps[] => {\n const connectors = useConnectors();\n\n const wallets = connectors.map((connector): WalletProps => {\n // use overrides\n const walletId = Object.keys(walletConfigs).find(\n // where id is comma seperated list\n id =>\n id\n .split(',')\n .map(i => i.trim())\n .indexOf(connector.id) !== -1\n );\n\n const c: WalletProps = {\n id: connector.id,\n name: connector.name ?? connector.id ?? connector.type,\n icon: (\n <img\n src={connector.icon}\n alt={connector.name}\n width={'100%'}\n height={'100%'}\n />\n ),\n connector,\n isInstalled:\n connector.type === 'mock' ||\n (connector.type === 'injected' && connector.id !== 'metaMask') ||\n isCoinbaseWalletConnector(connector.id) // always run coinbase wallet SDK\n };\n\n if (walletId) {\n const wallet = walletConfigs[walletId];\n return {\n ...c,\n iconConnector: connector.icon ? (\n <img\n src={connector.icon}\n alt={connector.name}\n width={'100%'}\n height={'100%'}\n />\n ) : undefined,\n ...wallet\n };\n }\n\n return c;\n });\n\n return (\n wallets\n // remove duplicate ids\n .filter(\n (wallet, index, self) =>\n self.findIndex(w => w.id === wallet.id) === index\n )\n // Replace walletConnect's name with the one from options\n .map(wallet => {\n if (wallet.id === 'walletConnect') {\n return {\n ...wallet,\n name: wallet.name,\n shortName: wallet.shortName\n };\n }\n return wallet;\n })\n // remove wallet with id coinbaseWalletSDK if wallet with id 'com.coinbase.wallet' exists\n .filter(\n (wallet, index, self) =>\n !(\n wallet.id === 'coinbaseWalletSDK' &&\n self.find(w => w.id === 'com.coinbase.wallet')\n )\n )\n // remove wallet with id io.metamask if wallet with id 'metaMask' exists\n .filter(\n (wallet, index, self) =>\n !(\n (wallet.id === 'metaMaskSDK' || wallet.id === 'metaMask') &&\n self.find(\n w => w.id === 'io.metamask' || w.id === 'io.metamask.mobile'\n )\n )\n )\n // order by isInstalled injected connectors first\n .sort((a, b) => {\n const AisInstalled =\n a.isInstalled && isInjectedConnector(a.connector.type);\n const BisInstalled =\n b.isInstalled && isInjectedConnector(b.connector.type);\n\n if (AisInstalled && !BisInstalled) return -1;\n if (!AisInstalled && BisInstalled) return 1;\n return 0;\n })\n // move walletConnect to the end\n .sort((a, b) => {\n if (a.id === 'walletConnect') return 1;\n if (b.id === 'walletConnect') return -1;\n return 0;\n })\n .sort((a, b) => {\n if (a.id === 'indodax') return -1;\n if (b.id === 'indodax') return 1;\n return 0;\n })\n );\n};\n","import { SVGProps } from 'react';\n\nexport const GoogleIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={20}\n height={20}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n {...props}\n >\n <path\n fill=\"#4285F4\"\n d=\"M12 9.818v4.648h6.458c-.283 1.494-1.134 2.76-2.41 3.61l3.894 3.022c2.269-2.094 3.578-5.17 3.578-8.825 0-.85-.076-1.67-.218-2.455H12Z\"\n />\n <path\n fill=\"#34A853\"\n d=\"m5.275 14.284-.879.673-3.109 2.421C3.262 21.295 7.31 24 12 24c3.24 0 5.957-1.069 7.942-2.902l-3.894-3.021c-1.07.72-2.433 1.156-4.048 1.156-3.12 0-5.77-2.105-6.72-4.942l-.004-.007Z\"\n />\n <path\n fill=\"#FBBC05\"\n d=\"M1.287 6.622A11.852 11.852 0 0 0 0 12c0 1.941.469 3.763 1.287 5.378 0 .01 3.993-3.098 3.993-3.098A7.191 7.191 0 0 1 4.898 12c0-.797.142-1.56.382-2.28L1.287 6.622Z\"\n />\n <path\n fill=\"#EA4335\"\n d=\"M12 4.778c1.767 0 3.338.611 4.593 1.79l3.436-3.437C17.945 1.189 15.239 0 11.999 0 7.31 0 3.263 2.695 1.288 6.622L5.28 9.72c.949-2.836 3.6-4.942 6.72-4.942Z\"\n />\n </svg>\n);\n\nexport const TelegramIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={20}\n height={20}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n {...props}\n >\n <g clipPath=\"url(#a)\">\n <path\n fill=\"url(#b)\"\n d=\"M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12Z\"\n />\n <path\n fill=\"#fff\"\n fillRule=\"evenodd\"\n d=\"M5.432 11.873c3.498-1.524 5.83-2.529 6.998-3.014 3.333-1.387 4.025-1.627 4.476-1.635.1-.002.322.023.465.14a.506.506 0 0 1 .171.324c.016.094.036.306.02.473-.18 1.897-.962 6.502-1.36 8.627-.168.9-.499 1.2-.82 1.23-.696.064-1.225-.46-1.9-.903-1.056-.692-1.653-1.123-2.678-1.799-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.213-.07-.062-.174-.04-.249-.024-.106.024-1.793 1.14-5.061 3.346-.48.329-.913.49-1.302.48-.428-.009-1.252-.242-1.865-.44-.752-.245-1.349-.374-1.297-.79.027-.215.325-.436.893-.662Z\"\n clipRule=\"evenodd\"\n />\n </g>\n <defs>\n <linearGradient\n id=\"b\"\n x1={12}\n x2={12}\n y1={0}\n y2={23.822}\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#2AABEE\" />\n <stop offset={1} stopColor=\"#229ED9\" />\n </linearGradient>\n <clipPath id=\"a\">\n <path fill=\"#fff\" d=\"M0 0h24v24H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\n\nexport const AppleIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={20}\n height={20}\n viewBox=\"0 0 24 26\"\n fill=\"none\"\n {...props}\n >\n <path\n fill=\"#F1F1F1\"\n d=\"M22.676 20.262c-.4.908-.874 1.744-1.422 2.513-.748 1.048-1.36 1.774-1.833 2.176-.731.662-1.515 1-2.355 1.02-.602 0-1.33-.169-2.175-.51-.849-.341-1.629-.51-2.342-.51-.748 0-1.55.169-2.408.51-.86.341-1.552.52-2.081.537-.805.034-1.607-.315-2.408-1.047-.512-.438-1.15-1.189-1.917-2.253-.822-1.136-1.497-2.454-2.027-3.956-.566-1.623-.85-3.194-.85-4.715 0-1.742.383-3.245 1.15-4.504a6.69 6.69 0 0 1 2.41-2.396 6.568 6.568 0 0 1 3.257-.903c.64 0 1.478.194 2.52.576 1.04.383 1.706.578 1.999.578.218 0 .96-.227 2.216-.68 1.188-.42 2.19-.595 3.012-.526 2.226.176 3.899 1.039 5.01 2.592-1.99 1.186-2.975 2.846-2.955 4.976.018 1.659.63 3.04 1.834 4.135a6.035 6.035 0 0 0 1.832 1.182c-.147.419-.302.82-.467 1.205ZM17.571.52c0 1.3-.484 2.515-1.447 3.638-1.163 1.336-2.57 2.108-4.094 1.986-.02-.156-.031-.32-.031-.492 0-1.249.553-2.585 1.535-3.677.49-.553 1.114-1.013 1.87-1.38.754-.36 1.468-.56 2.14-.595.019.174.027.348.027.52Z\"\n />\n <path\n stroke=\"#fff\"\n strokeOpacity={0.15}\n d=\"M20.847 22.485a13.569 13.569 0 0 0 1.669-3.165 6.564 6.564 0 0 1-1.544-1.077c-1.307-1.191-1.976-2.704-1.995-4.498-.02-2.145.909-3.858 2.722-5.105-1.003-1.155-2.425-1.82-4.316-1.97h-.002c-.724-.06-1.65.091-2.803.498h-.001l-.167-.47c-1.256.453-1.998.68-2.216.68-.293 0-.96-.195-1.999-.578l10.652 15.685Zm0 0c-.744 1.041-1.327 1.725-1.75 2.086l-.006.005-.005.004c-.657.594-1.328.873-2.025.89-.515 0-1.173-.146-1.983-.473l-.001-.001c-.893-.358-1.736-.545-2.528-.545-.823 0-1.688.186-2.593.544-.839.334-1.468.488-1.913.503H8.04c-.633.027-1.312-.241-2.05-.916l-.006-.005-.006-.005c-.465-.398-1.076-1.11-1.836-2.166-.79-1.093-1.445-2.367-1.96-3.83-.551-1.576-.824-3.091-.824-4.549 0-1.667.366-3.077 1.078-4.244l.002-.004a6.19 6.19 0 0 1 2.233-2.22 6.068 6.068 0 0 1 3.01-.835c.55 0 1.322.172 2.343.546l10.824 15.215ZM13.906 2.309l.002-.002c.44-.497 1.008-.92 1.713-1.261a5.717 5.717 0 0 1 1.45-.489c-.01 1.15-.438 2.24-1.325 3.274-.98 1.124-2.088 1.769-3.247 1.822v-.001c0-1.106.493-2.326 1.407-3.343Z\"\n />\n </svg>\n);\n\nexport const AppleDarkIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={20}\n height={20}\n viewBox=\"0 0 24 26\"\n fill=\"none\"\n {...props}\n >\n <path\n fill=\"#000000\"\n d=\"M22.676 20.262c-.4.908-.874 1.744-1.422 2.513-.748 1.048-1.36 1.774-1.833 2.176-.731.662-1.515 1-2.355 1.02-.602 0-1.33-.169-2.175-.51-.849-.341-1.629-.51-2.342-.51-.748 0-1.55.169-2.408.51-.86.341-1.552.52-2.081.537-.805.034-1.607-.315-2.408-1.047-.512-.438-1.15-1.189-1.917-2.253-.822-1.136-1.497-2.454-2.027-3.956-.566-1.623-.85-3.194-.85-4.715 0-1.742.383-3.245 1.15-4.504a6.69 6.69 0 0 1 2.41-2.396 6.568 6.568 0 0 1 3.257-.903c.64 0 1.478.194 2.52.576 1.04.383 1.706.578 1.999.578.218 0 .96-.227 2.216-.68 1.188-.42 2.19-.595 3.012-.526 2.226.176 3.899 1.039 5.01 2.592-1.99 1.186-2.975 2.846-2.955 4.976.018 1.659.63 3.04 1.834 4.135a6.035 6.035 0 0 0 1.832 1.182c-.147.419-.302.82-.467 1.205ZM17.571.52c0 1.3-.484 2.515-1.447 3.638-1.163 1.336-2.57 2.108-4.094 1.986-.02-.156-.031-.32-.031-.492 0-1.249.553-2.585 1.535-3.677.49-.553 1.114-1.013 1.87-1.38.754-.36 1.468-.56 2.14-.595.019.174.027.348.027.52Z\"\n />\n <path\n stroke=\"#000000\"\n strokeOpacity={0.15}\n d=\"M20.847 22.485a13.569 13.569 0 0 0 1.669-3.165 6.564 6.564 0 0 1-1.544-1.077c-1.307-1.191-1.976-2.704-1.995-4.498-.02-2.145.909-3.858 2.722-5.105-1.003-1.155-2.425-1.82-4.316-1.97h-.002c-.724-.06-1.65.091-2.803.498h-.001l-.167-.47c-1.256.453-1.998.68-2.216.68-.293 0-.96-.195-1.999-.578l10.652 15.685Zm0 0c-.744 1.041-1.327 1.725-1.75 2.086l-.006.005-.005.004c-.657.594-1.328.873-2.025.89-.515 0-1.173-.146-1.983-.473l-.001-.001c-.893-.358-1.736-.545-2.528-.545-.823 0-1.688.186-2.593.544-.839.334-1.468.488-1.913.503H8.04c-.633.027-1.312-.241-2.05-.916l-.006-.005-.006-.005c-.465-.398-1.076-1.11-1.836-2.166-.79-1.093-1.445-2.367-1.96-3.83-.551-1.576-.824-3.091-.824-4.549 0-1.667.366-3.077 1.078-4.244l.002-.004a6.19 6.19 0 0 1 2.233-2.22 6.068 6.068 0 0 1 3.01-.835c.55 0 1.322.172 2.343.546l10.824 15.215ZM13.906 2.309l.002-.002c.44-.497 1.008-.92 1.713-1.261a5.717 5.717 0 0 1 1.45-.489c-.01 1.15-.438 2.24-1.325 3.274-.98 1.124-2.088 1.769-3.247 1.822v-.001c0-1.106.493-2.326 1.407-3.343Z\"\n />\n </svg>\n);\n\nexport const WhatsappIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={20}\n height={20}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n {...props}\n >\n <path\n fill=\"#25D366\"\n d=\"m0 24 1.687-6.163A11.867 11.867 0 0 1 .1 11.891C.103 5.335 5.438 0 11.993 0a11.817 11.817 0 0 1 8.413 3.488 11.824 11.824 0 0 1 3.48 8.414c-.003 6.557-5.338 11.892-11.893 11.892a11.9 11.9 0 0 1-5.688-1.448L0 24Zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981Zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372S5.95 7.788 5.95 9.251s1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414Z\"\n />\n </svg>\n);\n\nexport const TwitterIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={20}\n height={20}\n fill=\"none\"\n viewBox=\"0 0 26 26\"\n {...props}\n >\n <path\n fill=\"#fff\"\n d=\"M19.853 2.063h3.655l-7.984 9.125 9.392 12.418h-7.354l-5.76-7.532-6.592 7.532H1.554l8.54-9.761L1.083 2.062h7.541l5.207 6.884 6.022-6.883ZM18.57 21.418h2.026L7.524 4.135H5.35l13.22 17.283Z\"\n />\n </svg>\n);\n","import styled from 'styled-components';\n\nimport { StyledButton } from '@/components/ui/button';\n\nexport const PassportContainer = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 16px;\n height: 100%;\n`;\n\nexport const InnerContainer = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 300px;\n`;\n\nexport const PassportTitle = styled.h3`\n font-size: 14px;\n font-weight: 600;\n line-height: 24px;\n margin-bottom: 24px;\n`;\n\nexport const IconsContainer = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: 12px;\n`;\n\nexport const TextInput = styled.input`\n height: 48px;\n border-radius: 12px;\n border: 1px solid ${({ theme }) => theme.colors.BORDER};\n padding: 0 12px;\n display: block;\n background-color: transparent;\n`;\n\nexport const Separator = styled.div`\n flex: 1;\n height: 1px;\n background-color: ${({ theme }) => theme.colors.BORDER};\n`;\n\nexport const Row = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: 12px;\n width: 100%;\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({ theme }) => theme.colors.TEXT};\n`;\n\nexport const SignInButton = styled(StyledButton)`\n height: 42px;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 12px;\n font-weight: 600;\n font-size: 13px;\n border-radius: 8px;\n`;\n","import {\n AppleDarkIcon,\n AppleIcon,\n GoogleIcon,\n TelegramIcon,\n TwitterIcon,\n WhatsappIcon\n} from '@/assets/socials';\nimport { useXellarContext } from '@/providers/indodax-kit';\n\nimport { AnimatedContainer, IconWrapper } from '../styled';\nimport {\n IconsContainer,\n InnerContainer,\n PassportContainer,\n PassportTitle,\n Row,\n Separator,\n SignInButton,\n TextInput\n} from './styled';\n\nexport function PassportContent() {\n const { theme } = useXellarContext();\n return (\n <AnimatedContainer\n initial={{ opacity: 0, x: 50 }}\n animate={{ opacity: 1, x: 0 }}\n exit={{ opacity: 0, x: -50 }}\n >\n <PassportContainer>\n <PassportTitle style={{ textAlign: 'center' }}>\n The gateway to <span style={{ color: '#01CFEA' }}>manage</span>{' '}\n everything in your <span style={{ color: '#FF1CF7' }}>wallet</span>\n </PassportTitle>\n\n <InnerContainer>\n <IconsContainer>\n <IconWrapper $size={48} $br={12}>\n <GoogleIcon />\n </IconWrapper>\n <IconWrapper $size={48} $br={12}>\n <TelegramIcon />\n </IconWrapper>\n <IconWrapper $size={48} $br={12}>\n {theme === 'dark' ? <AppleIcon /> : <AppleDarkIcon />}\n </IconWrapper>\n <IconWrapper $size={48} $br={12}>\n <WhatsappIcon />\n </IconWrapper>\n <IconWrapper $size={48} $br={12}>\n <TwitterIcon />\n </IconWrapper>\n </IconsContainer>\n\n <Row>\n <Separator />\n <span>Or</span>\n <Separator />\n </Row>\n\n <div\n style={{\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n gap: 12\n }}\n >\n <TextInput type=\"email\" placeholder=\"Enter your email\" />\n <SignInButton>Sign In</SignInButton>\n </div>\n </InnerContainer>\n </PassportContainer>\n </AnimatedContainer>\n );\n}\n","import { motion } from 'motion/react';\nimport { useState } from 'react';\nimport styled, { useTheme } from 'styled-components';\n\nimport { CopyIcon } from '@/assets/copy-icon';\nimport { QRCode } from '@/components/qr-code/qr-code';\nimport { WalletProps } from '@/wallets/use-wallet';\n\nimport {\n AnimatedContainer,\n IconWrapper,\n InnerQRCodeWrapper,\n Title\n} from '../styled';\ninterface WalletConnectModalContentProps {\n isConnecting: boolean;\n uri: string;\n wallet: WalletProps | null;\n rawUri: string;\n browserUrl?: string | null;\n}\n\nexport function WalletConnectModalContent({\n isConnecting,\n uri,\n wallet,\n rawUri,\n browserUrl\n}: WalletConnectModalContentProps) {\n const theme = useTheme();\n const [isCopied, setIsCopied] = useState(false);\n const handleCopy = async () => {\n if (isCopied) {\n setIsCopied(false);\n }\n if ('clipboard' in navigator) {\n await navigator.clipboard.writeText(rawUri);\n setIsCopied(true);\n setTimeout(() => {\n setIsCopied(false);\n }, 3000);\n }\n };\n\n const renderIcon = () => {\n if (!wallet) return null;\n return wallet.icon;\n };\n\n return (\n <AnimatedContainer\n initial={{ opacity: 0, x: 50 }}\n animate={{ opacity: 1, x: 0 }}\n exit={{ opacity: 0, x: -50 }}\n >\n <TitleContainer>\n <StyledTitle>Scan With Your Phone</StyledTitle>\n <CopyIconWrapper onClick={handleCopy}>\n <CopyIcon color={theme.colors.TEXT_SECONDARY} />\n </CopyIconWrapper>\n </TitleContainer>\n\n <InnerQRCodeWrapper>\n <QRCode\n blur={isConnecting}\n icon={<IconWrapper $size={48}>{renderIcon()}</IconWrapper>}\n size={320}\n uri={uri}\n />\n {isCopied && (\n <CopiedText\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n >\n Copied to clipboard\n </CopiedText>\n )}\n\n {browserUrl && !isCopied && (\n <WebUrl href={browserUrl} target=\"_blank\" rel=\"noopener noreferrer\">\n Open in browser\n </WebUrl>\n )}\n </InnerQRCodeWrapper>\n </AnimatedContainer>\n );\n}\n\nconst TitleContainer = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n`;\n\nconst StyledTitle = styled(Title)`\n flex-shrink: 0;\n`;\n\nconst CopyIconWrapper = styled.div`\n cursor: pointer;\n`;\nCopyIconWrapper.defaultProps = {\n role: 'button'\n};\n\nconst CopiedText = styled(motion.p)`\n font-size: 10px;\n color: ${({ theme }) => theme.colors.TEXT_SECONDARY};\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n text-align: center;\n`;\n\nconst WebUrl = styled(motion.a)`\n font-size: 12px;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n text-align: center;\n color: ${({ theme }) => theme.colors.PRIMARY_ACCENT};\n &:hover {\n color: ${({ theme }) => theme.colors.PRIMARY};\n }\n`;\n","import { SVGProps } from 'react';\n\nexport const CopyIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={15}\n height={16}\n viewBox=\"0 0 15 16\"\n fill=\"none\"\n {...props}\n >\n <path\n fill={props.color || '#fff'}\n d=\"M14.375.5h-10a.625.625 0 0 0-.625.625V4.25H.625A.625.625 0 0 0 0 4.875v10a.625.625 0 0 0 .625.625h10a.624.624 0 0 0 .625-.625V11.75h3.125a.624.624 0 0 0 .625-.625v-10A.625.625 0 0 0 14.375.5ZM10 14.25H1.25V5.5H10v8.75Zm3.75-3.75h-2.5V4.875a.625.625 0 0 0-.625-.625H5v-2.5h8.75v8.75Z\"\n />\n </svg>\n);\n","import { motion } from 'motion/react';\nimport QRCodeUtil from 'qrcode';\nimport React, { type ReactElement, useMemo } from 'react';\nimport styled from 'styled-components';\n\nconst generateMatrix = (\n value: string,\n errorCorrectionLevel: QRCodeUtil.QRCodeErrorCorrectionLevel\n) => {\n const arr = Array.prototype.slice.call(\n QRCodeUtil.create(value, { errorCorrectionLevel }).modules.data,\n 0\n );\n const sqrt = Math.sqrt(arr.length);\n return arr.reduce(\n (rows, key, index) =>\n (index % sqrt === 0\n ? rows.push([key])\n : rows[rows.length - 1].push(key)) && rows,\n []\n );\n};\n\ntype Props = {\n ecl?: QRCodeUtil.QRCodeErrorCorrectionLevel;\n logoBackground?: string;\n logoUrl?: string | (() => Promise<string>);\n logoMargin?: number;\n logoSize?: number;\n size?: number;\n uri: string;\n icon?: ReactElement;\n blur?: boolean;\n};\n\nexport function QRCode({\n ecl = 'M',\n logoMargin = 10,\n logoSize = 50,\n icon,\n size: sizeProp = 200,\n uri,\n blur = false\n}: Props) {\n const size = sizeProp - Number.parseInt('20', 10) * 2;\n\n const dots = useMemo(() => {\n const dots: ReactElement[] = [];\n const matrix = generateMatrix(uri, ecl);\n const cellSize = size / matrix.length;\n const qrList = [\n { x: 0, y: 0 },\n { x: 1, y: 0 },\n { x: 0, y: 1 }\n ];\n\n // biome-ignore lint/complexity/noForEach: TODO\n qrList.forEach(({ x, y }) => {\n const x1 = (matrix.length - 7) * cellSize * x;\n const y1 = (matrix.length - 7) * cellSize * y;\n for (let i = 0; i < 3; i++) {\n dots.push(\n <rect\n fill={i % 2 !== 0 ? 'white' : 'black'}\n height={cellSize * (7 - i * 2)}\n key={`${i}-${x}-${y}`}\n rx={(i - 2) * -5 + (i === 0 ? 2 : 0)} // calculated border radius for corner squares\n ry={(i - 2) * -5 + (i === 0 ? 2 : 0)} // calculated border radius for corner squares\n width={cellSize * (7 - i * 2)}\n x={x1 + cellSize * i}\n y={y1 + cellSize * i}\n />\n );\n }\n });\n\n const clearArenaSize = Math.floor((logoSize + 25) / cellSize);\n const matrixMiddleStart = matrix.length / 2 - clearArenaSize / 2;\n const matrixMiddleEnd = matrix.length / 2 + clearArenaSize / 2 - 1;\n\n matrix.forEach((row: QRCodeUtil.QRCode[], i: number) => {\n row.forEach((_, j: number) => {\n if (matrix[i][j]) {\n if (\n !(\n (i < 7 && j < 7) ||\n (i > matrix.length - 8 && j < 7) ||\n (i < 7 && j > matrix.length - 8)\n )\n ) {\n if (\n !(\n i > matrixMiddleStart &&\n i < matrixMiddleEnd &&\n j > matrixMiddleStart &&\n j < matrixMiddleEnd\n )\n ) {\n dots.push(\n <circle\n cx={i * cellSize + cellSize / 2}\n cy={j * cellSize + cellSize / 2}\n fill=\"black\"\n key={`circle-${i}-${j}`}\n r={cellSize / 3} // calculate size of single dots\n />\n );\n }\n }\n }\n });\n });\n\n return dots;\n }, [ecl, logoSize, size, uri]);\n\n const logoWrapperSize = logoSize + logoMargin * 2;\n\n return (\n <QRCodeWrapper>\n <Box\n style={{\n width: size,\n height: size,\n position: 'relative',\n filter: blur ? 'blur(2px)' : 'none',\n transition: 'filter 0.2s ease-in-out'\n }}\n >\n <svg height={size} style={{ all: 'revert' }} width={size}>\n <title>QR Code</title>\n <defs>\n <clipPath id=\"clip-wrapper\">\n <rect height={logoWrapperSize} width={logoWrapperSize} />\n </clipPath>\n <clipPath id=\"clip-logo\">\n <rect height={logoSize} width={logoSize} />\n </clipPath>\n </defs>\n <rect fill=\"transparent\" height={size} width={size} />\n {dots}\n </svg>\n </Box>\n <IconContainer>{icon}</IconContainer>\n </QRCodeWrapper>\n );\n}\n\nconst QRCodeWrapper = styled(motion.div)`\n background-color: #fff;\n padding: 20px;\n border-radius: 10px;\n aspect-ratio: 1;\n position: relative;\n`;\n\nconst Box = styled.div`\n background-color: #fff;\n`;\n\nconst IconContainer = styled.div`\n position: absolute;\n z-index: 3;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n","import { AnimatePresence } from 'motion/react';\nimport { useState } from 'react';\nimport styled from 'styled-components';\n\nimport { SpinnerIcon } from '@/assets/spinner';\nimport { useWalletConnection } from '@/hooks/use-wallet-connection';\nimport { useWallets } from '@/wallets/use-wallet';\n\nimport { PassportContent } from './passport-content/passport-content';\nimport {\n Container,\n Description,\n IconWrapper,\n Separator,\n Title,\n TitleSpan,\n WalletItem,\n WalletName,\n Wrapper\n} from './styled';\n\nexport function ConnectDialogMobileContent() {\n const wallets = useWallets();\n\n const { wallet, setWallet, isConnecting } = useWalletConnection();\n\n const [showPassportContent] = useState(false);\n\n const renderContent = () => {\n if (showPassportContent) return <PassportContent />;\n\n return (\n <Container $isMobile>\n <Title>\n Connect <TitleSpan>Wallet</TitleSpan>\n </Title>\n <Separator />\n\n <Description>\n Wallets are used to send, receive, store, and display digital assets\n like Ethereum and NFTs.\n </Description>\n\n <ConnectorList>\n {wallets.map(_wallet => (\n <WalletItem\n key={_wallet.id}\n onClick={() => {\n setWallet(_wallet);\n }}\n selected={_wallet.id === wallet?.id}\n >\n <IconWrapper>{_wallet.icon}</IconWrapper>\n <WalletName>{_wallet.name}</WalletName>\n {_wallet.id === wallet?.id && isConnecting && <SpinnerIcon />}\n </WalletItem>\n ))}\n </ConnectorList>\n </Container>\n );\n };\n\n return (\n <Wrapper>\n <AnimatePresence mode=\"wait\">{renderContent()}</AnimatePresence>\n </Wrapper>\n );\n}\n\nconst ConnectorList = styled.div`\n overflow-y: auto;\n`;\n\n/* <WalletItem\n selected={showPassportContent}\n onClick={() => {\n setShowPassportContent(true);\n setUri(null);\n }}\n >\n <IconWrapper>\n {theme === 'light' ? <XellarDark /> : <XellarLight />}\n </IconWrapper>\n <WalletName>Xellar Passport</WalletName>\n </WalletItem> */\n","import { useState } from 'react';\nimport styled, { useTheme } from 'styled-components';\nimport { useAccount, useDisconnect } from 'wagmi';\n\nimport { CopyIcon } from '@/assets/copy-icon';\nimport { StyledButton } from '@/components/ui/button';\nimport { useXellarContext } from '@/providers/indodax-kit';\nimport { truncateAddress } from '@/utils/string';\n\nimport { Separator, Title } from '../styled';\n\nexport function ProfileDialogContent() {\n const { closeModal } = useXellarContext();\n const { disconnectAsync } = useDisconnect();\n const { address } = useAccount();\n const handleDisconnect = async () => {\n await disconnectAsync();\n closeModal();\n };\n\n const theme = useTheme();\n\n const [isCopied, setIsCopied] = useState(false);\n const handleCopy = async () => {\n if (isCopied) {\n setIsCopied(false);\n }\n if ('clipboard' in navigator) {\n await navigator.clipboard.writeText(address ?? '');\n setIsCopied(true);\n setTimeout(() => {\n setIsCopied(false);\n }, 3000);\n }\n };\n\n return (\n <Wrapper>\n <Title>Connected</Title>\n <Separator />\n\n <AddressField>\n <Address>{truncateAddress(address ?? '')}</Address>\n\n <CopyIconWrapper onClick={handleCopy}>\n <CopyIcon color={theme.colors.TEXT_SECONDARY} />\n </CopyIconWrapper>\n </AddressField>\n\n <StyledButton onClick={handleDisconnect}>Disconnect</StyledButton>\n </Wrapper>\n );\n}\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 280px;\n`;\n\nconst AddressField = styled.div`\n display: flex;\n flex-direction: row;\n gap: 8px;\n height: 32px;\n background-color: ${({ theme }) => theme.colors.BG_SECONDARY};\n border-radius: 8px;\n align-items: center;\n padding: 0 12px;\n`;\n\nconst Address = styled.p`\n font-size: 14px;\n font-weight: 500;\n flex: 1;\n`;\n\nconst CopyIconWrapper = styled.div`\n cursor: pointer;\n`;\n\nCopyIconWrapper.defaultProps = {\n role: 'button'\n};\n","import { AnimatePresence, motion } from 'motion/react';\nimport React, {\n MouseEventHandler,\n useCallback,\n useEffect,\n useState\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport styled from 'styled-components';\n\nimport { isMobile } from '@/utils/is-mobile';\n\ninterface DialogProps {\n isOpen: boolean;\n onClose: () => void;\n children: React.ReactNode;\n}\n\nexport function Dialog({\n isOpen,\n onClose,\n children\n}: DialogProps): React.JSX.Element | null {\n const [mounted, setMounted] = React.useState(false);\n const [isBottomSheet, setIsBottomSheet] = useState(false);\n\n useEffect(() => {\n const checkMobile = () => setIsBottomSheet(isMobile());\n checkMobile();\n window.addEventListener('resize', checkMobile);\n return () => window.removeEventListener('resize', checkMobile);\n }, []);\n\n useEffect(() => {\n const handleEscape = (event: KeyboardEvent) =>\n isOpen && event.key === 'Escape' && onClose();\n\n document.addEventListener('keydown', handleEscape);\n\n return () => document.removeEventListener('keydown', handleEscape);\n }, [isOpen, onClose]);\n\n const [bodyScrollable, setBodyScrollable] = useState(true);\n useEffect(() => {\n setBodyScrollable(\n getComputedStyle(window.document.body).overflow !== 'hidden'\n );\n }, []);\n\n const handleBackdropClick = useCallback(() => onClose(), [onClose]);\n\n React.useEffect(() => {\n setMounted(true);\n return () => setMounted(false);\n }, []);\n\n if (!mounted) {\n return null;\n }\n\n const portalContent = (\n <RemoveScroll enabled={bodyScrollable}>\n <AnimatePresence>\n {isOpen && (\n <Backdrop\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n onClick={handleBackdropClick}\n >\n <DialogContent\n variants={variants[isBottomSheet ? 'mobile' : 'desktop']}\n initial=\"initial\"\n animate=\"animate\"\n exit=\"exit\"\n transition={{\n type: 'spring',\n bounce: 0,\n damping: 20,\n mass: 0.5,\n stiffness: 250\n }}\n onClick={stopPropagation}\n $isMobile={isBottomSheet}\n >\n <InnerDialogContent $isMobile={isBottomSheet} layout>\n {children}\n </InnerDialogContent>\n </DialogContent>\n </Backdrop>\n )}\n </AnimatePresence>\n </RemoveScroll>\n );\n\n return createPortal(portalContent, document.body);\n}\n\nconst Backdrop = styled(motion.div)`\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: ${({ theme }) => theme.colors.BACKGROUND_TRANSPARENT};\n backdrop-filter: blur(4px);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n`;\n\nconst DialogContent = styled(motion.div)<{ $isMobile: boolean }>`\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n 'Open Sans',\n 'Helvetica Neue',\n sans-serif;\n position: ${({ $isMobile }) => ($isMobile ? 'fixed' : 'relative')};\n min-width: 280px;\n max-width: ${({ $isMobile }) => ($isMobile ? '100%' : '90%')};\n max-height: ${({ $isMobile }) => ($isMobile ? '85vh' : '90vh')};\n margin-top: ${({ $isMobile }) => ($isMobile ? 'auto' : '0')};\n ${({ $isMobile }) =>\n $isMobile &&\n `\n bottom: 0;\n left: 0;\n right: 0;\n `}\n`;\n\nconst InnerDialogContent = styled(motion.div)<{ $isMobile: boolean }>`\n padding: 18px;\n overflow-y: auto;\n background-color: ${({ theme }) => theme.colors.BACKGROUND};\n border: 2px solid ${({ theme }) => theme.colors.BORDER};\n border-radius: ${({ $isMobile }) => ($isMobile ? '20px 20px 0 0' : '20px')};\n box-shadow: 0 4px 100px -19px ${({ theme }) => theme.colors.SHADOW};\n color: ${({ theme }) => theme.colors.TEXT};\n`;\n\nconst variants = {\n desktop: {\n initial: { scale: 0.95, opacity: 0 },\n animate: { scale: 1, opacity: 1 },\n exit: { scale: 0.95, opacity: 0 }\n },\n mobile: {\n initial: { y: '100%', opacity: 1 },\n animate: { y: 0, opacity: 1 },\n exit: { y: '100%', opacity: 1 }\n }\n};\n\nconst stopPropagation: MouseEventHandler<unknown> = event =>\n event.stopPropagation();\n","export const defaultTheme = {\n colors: {\n BACKGROUND_TRANSPARENT: 'rgba(0, 0, 0, 0.5)',\n PRIMARY: '#0F9DCE',\n PRIMARY_ACCENT: '#2AABEE',\n BACKGROUND: '#000000',\n TEXT: '#FFFFFF',\n TEXT_SECONDARY: '#737373',\n SHADOW: '#475D81',\n BORDER: '#262626',\n BG_SECONDARY: '#171717'\n }\n};\n\nexport const lightTheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n BACKGROUND: '#fafafa',\n TEXT: '#171717',\n TEXT_SECONDARY: '#a3a3a3',\n BG_SECONDARY: '#d4d4d4',\n BORDER: '#a3a3a3',\n SHADOW: '#a5f3fc',\n BACKGROUND_TRANSPARENT: 'rgba(255, 255, 255, 0.5)'\n }\n};\n\nexport type Theme = typeof defaultTheme;\n\n// import original module declarations\nimport 'styled-components';\n\n// and extend them!\ndeclare module 'styled-components' {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n export interface DefaultTheme extends Theme {}\n}\n","import { Config, createConfig, CreateConfigParameters, Transport } from 'wagmi';\nimport { arbitrum, Chain, mainnet, optimism, polygon } from 'wagmi/chains';\n\nimport { defaultConnectors } from './connectors';\nimport { getDefaultTransports } from './default-transport';\n\nexport type _chains = readonly [Chain, ...Chain[]];\n// Define the '_transports' type as a Record\n// It maps each 'Chain' id to a 'Transport'\nexport type _transports = Record<_chains[number]['id'], Transport>;\n\ninterface GetDefaultConfigParameters<\n chains extends _chains,\n transports extends _transports\n> extends Omit<\n CreateConfigParameters<chains, transports>,\n // If you use 'client' you can't use 'transports' (we force to use 'transports')\n // More info here https://wagmi.sh/core/api/createConfig#client\n // We will also use our own 'connectors' instead of letting user specifying it\n 'client' | 'connectors' | 'chains'\n > {\n appName: string;\n appIcon?: string;\n appDescription?: string;\n appUrl?: string;\n chains?: _chains;\n // WC 2.0 requires a project ID (get one here: https://cloud.walletconnect.com/sign-in)\n walletConnectProjectId: string;\n}\n\nexport const defaultConfig = ({\n appName = 'Xellar Kit',\n appIcon,\n appDescription,\n appUrl,\n walletConnectProjectId,\n ...wagmiParameters\n}: GetDefaultConfigParameters<_chains, _transports>): Config => {\n const { transports, chains, ...restWagmiParameters } = wagmiParameters;\n const defaultChains = chains || [mainnet, polygon, optimism, arbitrum];\n\n const _connectors = defaultConnectors({\n app: {\n name: appName,\n icon: appIcon,\n description: appDescription,\n url: appUrl\n },\n walletConnectProjectId\n }); // Type assertion here\n\n const _transports = transports || getDefaultTransports({ chains });\n\n return createConfig({\n chains: defaultChains,\n connectors: _connectors,\n transports: _transports,\n ...restWagmiParameters\n });\n};\n","import { CreateConnectorFn, injected } from 'wagmi';\n\nimport { walletConnectors } from '@/wallets/wallets';\n\ntype DefaultConnectorsProps = {\n app?: {\n name: string;\n icon?: string;\n description?: string;\n url?: string;\n };\n walletConnectProjectId: string;\n};\n\nexport const defaultConnectors = ({\n app,\n walletConnectProjectId\n}: DefaultConnectorsProps): CreateConnectorFn[] => {\n const connectors: CreateConnectorFn[] = [];\n\n connectors.push(injected({ target: 'metaMask' }));\n\n if (walletConnectProjectId) {\n connectors.push(\n ...walletConnectors({\n projectId: walletConnectProjectId,\n ...(app ?? {})\n })\n );\n }\n\n // }\n /*\n connectors.push(\n injected({\n shimDisconnect: true,\n })\n );\n */\n\n return connectors;\n};\n","import { createConnector, CreateConnectorFn } from 'wagmi';\nimport { walletConnect, WalletConnectParameters } from 'wagmi/connectors';\n\ninterface GetOrCreateWalletConnectInstanceParams {\n projectId: string;\n walletConnectParameters?: Omit<WalletConnectParameters, 'projectId'>;\n showQrModal: boolean;\n}\n\ntype CreateWalletConnectConnectorParams = {\n projectId: string;\n walletConnectParameters?: Omit<WalletConnectParameters, 'projectId'>;\n showQrModal: boolean;\n id: string;\n name: string;\n mobileUrl?: string;\n desktopUrl?: string;\n};\n\nconst walletConnectInstances = new Map<\n string,\n ReturnType<typeof walletConnect>\n>();\n\nconst getOrCreateWalletConnectInstance = ({\n projectId,\n walletConnectParameters,\n showQrModal\n}: GetOrCreateWalletConnectInstanceParams): ReturnType<\n typeof walletConnect\n> => {\n let config: WalletConnectParameters = {\n ...(walletConnectParameters ? walletConnectParameters : {}),\n projectId,\n showQrModal: false // Required. Otherwise WalletConnect modal (Web3Modal) will popup during time of connection for a wallet\n };\n\n // `showQrModal` should always be `true`\n if (showQrModal) {\n config = { ...config, showQrModal: true };\n }\n\n const serializedConfig = JSON.stringify(config);\n\n const sharedWalletConnector = walletConnectInstances.get(serializedConfig);\n\n if (sharedWalletConnector) {\n return sharedWalletConnector;\n }\n\n // Create a new walletConnect instance and store it\n const newWalletConnectInstance = walletConnect(config);\n\n walletConnectInstances.set(serializedConfig, newWalletConnectInstance);\n\n return newWalletConnectInstance;\n};\n\nexport function createWalletConnectConnector({\n projectId,\n walletConnectParameters,\n showQrModal,\n id,\n name,\n mobileUrl,\n desktopUrl\n}: CreateWalletConnectConnectorParams): CreateConnectorFn {\n // Create and configure the WalletConnect connector with project ID and options.\n return createConnector(config => ({\n ...getOrCreateWalletConnectInstance({\n projectId,\n walletConnectParameters,\n // Used in `connectorsForWallets` to add another\n // walletConnect wallet into rainbowkit with modal popup option\n showQrModal\n })(config),\n id,\n name,\n mobileUrl,\n desktopUrl\n }));\n}\n","import { WalletConnectParameters } from 'wagmi/connectors';\n\nimport { createWalletConnectConnector } from './get-wc-connector';\n\ninterface AppParams {\n name?: string;\n icon?: string;\n description?: string;\n url?: string;\n projectId: string;\n}\n\nconst qrModalOptions: WalletConnectParameters['qrModalOptions'] = {\n explorerRecommendedWalletIds: [\n '7819f9cd07e8d7101a483087869f1e57b7d448f3ec5f4ef3eda63c19b926dc17'\n ],\n explorerExcludedWalletIds: 'ALL'\n};\n\nexport const walletConnectors = (appParams: AppParams) => [\n // createWalletConnectConnector({\n // projectId: appParams.projectId,\n // walletConnectParameters: {\n // qrModalOptions\n // },\n // showQrModal: false,\n // id: 'xellar-mobile',\n // name: 'Xellar Mobile'\n // }),\n\n createWalletConnectConnector({\n projectId: appParams.projectId,\n walletConnectParameters: {\n qrModalOptions\n },\n showQrModal: false,\n id: 'indodax',\n name: 'Indodax'\n }),\n\n createWalletConnectConnector({\n projectId: appParams.projectId,\n walletConnectParameters: {\n qrModalOptions\n },\n showQrModal: false,\n id: 'reown',\n name: 'Reown'\n }),\n\n createWalletConnectConnector({\n projectId: appParams.projectId,\n walletConnectParameters: {\n qrModalOptions\n },\n showQrModal: false,\n id: 'walletConnect',\n name: 'WalletConnect'\n })\n];\n","/**\n * TODO: Automate transports based on configured chains\n *\n * Developers using this causes loss of granular control over a dapps transports,\n * but for simple use cases, it's nice to have and saves a lot of boilerplate.\n *\n */\n\nimport { type HttpTransport, type WebSocketTransport } from 'viem';\nimport { CreateConfigParameters, fallback, http, Transport } from 'wagmi';\nimport { arbitrum, mainnet, optimism, polygon } from 'wagmi/chains';\n\ntype _chain = CreateConfigParameters['chains'];\n\ntype GetDefaultTransportsProps = {\n chains?: _chain;\n alchemyId?: string;\n infuraId?: string;\n};\n\nexport const getDefaultTransports = ({\n chains = [mainnet, polygon, optimism, arbitrum]\n}: GetDefaultTransportsProps): Record<number, Transport> => {\n const transports: Record<number, Transport> = {};\n\n chains.forEach(chain => {\n const urls: (HttpTransport | WebSocketTransport)[] = [];\n urls.push(http());\n transports[chain.id] = fallback(urls);\n });\n\n return transports;\n};\n"],"mappings":";AAAA,OAAOA,OAAY,oBCAZ,IAAMC,EAAmBC,GACvB,GAAGA,EAAQ,MAAM,EAAG,CAAC,CAAC,MAAMA,EAAQ,MAAM,EAAE,CAAC,GCDtD,OAAOC,OAAY,oBAEZ,IAAMC,EAAeD,GAAO;AAAA,sBACb,CAAC,CAAE,MAAAE,CAAM,IAAMA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASzDD,EAAa,aAAe,CAC1B,KAAM,QACR,ECXA,IAAME,GAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAE1B,SAASC,EAAYC,EAAgBC,EAAY,EAAG,CACzD,OAAOD,EACJ,SAAS,EACT,QAAQ,IAAI,OAAO,aAAaC,CAAS,QAAQ,EAAG,IAAI,EACxD,QAAQ,gBAAiB,IAAI,EAC7B,QAAQ,MAAO,EAAE,CACtB,CAEO,SAASC,GAAqBF,EAAwB,CAE3D,GAAIA,EAAS,KAEX,OAAOA,EAAO,QAAQ,CAAC,EAAE,QAAQ,SAAU,EAAE,EAG/C,GAAIA,EAAS,EAAG,OAAOD,EAAYC,EAAQ,CAAC,EAC5C,GAAIA,EAAS,IAAM,EAAG,OAAOD,EAAYC,EAAQ,CAAC,EAClD,GAAIA,EAAS,IAAM,EACjB,OAAO,IAAI,KAAK,aAAa,EAAE,OAC7B,OAAO,WAAWD,EAAYC,EAAQ,CAAC,CAAC,CAC1C,EAEF,IAAMG,EAAkB,IAAM,EAE1BC,EAAS,OAAOJ,CAAM,EAE1B,QAASK,EAAIP,GAAM,OAAS,EAAGO,GAAK,EAAGA,IAAK,CAC1C,IAAMC,EAAO,MAAQD,EAAI,GAAK,GAE9B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C,EACb,IAAKC,CACP,EACA,uBAAAC,CACF,CAAC,EAEKY,EAAcV,GAAcW,GAAqB,CAAE,OAAAV,CAAO,CAAC,EAEjE,OAAOW,GAAa,CAClB,OAAQT,EACR,WAAYK,EACZ,WAAYE,EACZ,GAAGR,CACL,CAAC,CACH","names":["styled","truncateAddress","address","styled","StyledButton","theme","units","toPrecision","number","precision","abbreviateETHBalance","decimalsDivisor","result","i","size","useAccount","useBalance","useChainId","useChains","useDisconnect","MODAL_TYPE","createContext","createElement","useContext","useEffect","useMemo","useState","createGlobalStyle","ThemeProvider","reset","useConfig","WagmiContext","useState","styled","useChainId","useChains","useSwitchChain","styled","jsx","SpinnerIcon","props","StyledSpinner","motion","styled","Wrapper","ConnectContentWrapper","InnerQRCodeWrapper","Container","$isMobile","Icon","Separator","theme","Title","Description","EmptyStateWrapper","AnimatedContainer","TitleSpan","WalletItem","selected","WalletName","IconWrapper","$size","$br","jsx","jsxs","ChainDialogContent","chains","useChains","chainId","useChainId","switchChain","isPending","useSwitchChain","selectedChain","setSelectedChain","useState","handleSwitchChain","chainIdToSwitch","Wrapper","Title","Separator","chain","ChainItem","ChainName","SpinnerIcon","styled","theme","selected","AnimatePresence","useState","styled","useEffect","useRef","useState","useConnect","walletConnect","isAndroid","isSmallIOS","isLargeIOS","isIOS","isMobileDevice","isMobile","useWagmiConnectors","useConnectors","connectors","c","wallet","index","self","w","a","b","useConnector","id","uuid","useWalletConnection","closeModal","walletConnectProjectId","useXellarContext","wallet","setWallet","useState","wcConnector","useConnector","uri","setUri","isConnecting","setIsConnecting","connectAsync","useConnect","getWalletConnectUri","connector","provider","resolve","_uri","onQrCode","onWalletConnect","_connector","w3mcss","cn","walletConnect","isMobileDevice","err","selectWallet","error","acccount","selectWalletRef","useRef","useEffect","jsx","jsxs","GenericWalletIcon","props","jsx","jsxs","IndodaxIcon","props","jsx","jsxs","MetaMaskIcon","props","jsx","jsxs","ReownLightIcon","props","jsx","WalletConnectIcon","props","jsx","walletConfigs","GenericWalletIcon","IndodaxIcon","uri","isAndroid","MetaMaskIcon","isIOS","ReownLightIcon","WalletConnectIcon","jsx","isInjectedConnector","connectorId","isCoinbaseWalletConnector","useWallets","useConnectors","connector","walletId","walletConfigs","id","i","c","jsx","isCoinbaseWalletConnector","wallet","index","self","w","a","b","AisInstalled","isInjectedConnector","BisInstalled","jsx","jsxs","GoogleIcon","props","TelegramIcon","AppleIcon","AppleDarkIcon","WhatsappIcon","TwitterIcon","styled","PassportContainer","styled","InnerContainer","PassportTitle","IconsContainer","TextInput","theme","Separator","Row","SignInButton","StyledButton","jsx","jsxs","PassportContent","theme","useXellarContext","AnimatedContainer","PassportContainer","PassportTitle","InnerContainer","IconsContainer","IconWrapper","GoogleIcon","TelegramIcon","AppleIcon","AppleDarkIcon","WhatsappIcon","TwitterIcon","Row","Separator","TextInput","SignInButton","motion","useState","styled","useTheme","jsx","CopyIcon","props","motion","QRCodeUtil","useMemo","styled","jsx","jsxs","generateMatrix","value","errorCorrectionLevel","arr","sqrt","rows","key","index","QRCode","ecl","logoMargin","logoSize","icon","sizeProp","uri","blur","size","dots","matrix","cellSize","x","y","x1","y1","i","clearArenaSize","matrixMiddleStart","matrixMiddleEnd","row","_","j","logoWrapperSize","QRCodeWrapper","Box","IconContainer","jsx","jsxs","WalletConnectModalContent","isConnecting","uri","wallet","rawUri","browserUrl","theme","useTheme","isCopied","setIsCopied","useState","handleCopy","renderIcon","AnimatedContainer","TitleContainer","StyledTitle","CopyIconWrapper","CopyIcon","InnerQRCodeWrapper","QRCode","IconWrapper","CopiedText","WebUrl","styled","Title","motion","jsx","jsxs","ConnectDialogContent","wallets","useWallets","wallet","setWallet","uri","isConnecting","useWalletConnection","deeplink","browserUrl","showPassportContent","useState","renderContent","PassportContent","WalletConnectModalContent","EmptyStateWrapper","Description","Wrapper","Container","Title","TitleSpan","Separator","ConnectorList","_wallet","WalletItem","IconWrapper","WalletName","SpinnerIcon","ConnectContentWrapper","AnimatePresence","styled","AnimatePresence","useState","styled","jsx","jsxs","ConnectDialogMobileContent","wallets","useWallets","wallet","setWallet","isConnecting","useWalletConnection","showPassportContent","useState","Wrapper","AnimatePresence","PassportContent","Container","Title","TitleSpan","Separator","Description","ConnectorList","_wallet","WalletItem","IconWrapper","WalletName","SpinnerIcon","styled","useState","styled","useTheme","useAccount","useDisconnect","jsx","jsxs","ProfileDialogContent","closeModal","useXellarContext","disconnectAsync","useDisconnect","address","useAccount","handleDisconnect","theme","useTheme","isCopied","setIsCopied","useState","handleCopy","Wrapper","Title","Separator","AddressField","Address","truncateAddress","CopyIconWrapper","CopyIcon","StyledButton","styled","AnimatePresence","motion","React","useCallback","useEffect","useState","createPortal","RemoveScroll","styled","jsx","Dialog","isOpen","onClose","children","mounted","setMounted","React","isBottomSheet","setIsBottomSheet","useState","useEffect","checkMobile","isMobile","handleEscape","event","bodyScrollable","setBodyScrollable","handleBackdropClick","useCallback","portalContent","RemoveScroll","AnimatePresence","Backdrop","DialogContent","variants","stopPropagation","InnerDialogContent","createPortal","styled","motion","theme","$isMobile","defaultTheme","lightTheme","Fragment","jsx","jsxs","GlobalStyle","createGlobalStyle","reset","XellarKitContext","createContext","IndodaxKitProvider","children","theme","useContext","WagmiContext","config","useConfig","modalOpen","setModalOpen","useState","modalType","setModalType","wcProjectId","setWcProjectId","useEffect","c","p","handleOpenModal","type","handleCloseModal","modalContent","useMemo","MODAL_TYPE","isMobile","ConnectDialogMobileContent","ConnectDialogContent","ChainDialogContent","ProfileDialogContent","_exhaustiveCheck","value","createElement","ThemeProvider","defaultTheme","lightTheme","Dialog","useXellarContext","context","Fragment","jsx","ConnectButtonRenderer","children","openModal","useXellarContext","address","isConnected","useAccount","disconnect","useDisconnect","chainId","useChainId","chain","useChains","balance","useBalance","openConnectModal","MODAL_TYPE","openChainModal","openProfileModal","jsx","jsxs","ConnectButton","className","ConnectButtonRenderer","isConnected","account","openConnectModal","openChainModal","chain","openProfileModal","displayBalance","abbreviateETHBalance","StyledButton","Row","truncateAddress","styled","createConfig","arbitrum","mainnet","optimism","polygon","injected","createConnector","walletConnect","walletConnectInstances","getOrCreateWalletConnectInstance","projectId","walletConnectParameters","showQrModal","config","serializedConfig","sharedWalletConnector","newWalletConnectInstance","createWalletConnectConnector","id","name","mobileUrl","desktopUrl","qrModalOptions","walletConnectors","appParams","createWalletConnectConnector","defaultConnectors","app","walletConnectProjectId","connectors","injected","walletConnectors","fallback","http","arbitrum","mainnet","optimism","polygon","getDefaultTransports","chains","transports","chain","urls","defaultConfig","appName","appIcon","appDescription","appUrl","walletConnectProjectId","wagmiParameters","transports","chains","restWagmiParameters","defaultChains","mainnet","polygon","optimism","arbitrum","_connectors","defaultConnectors","_transports","getDefaultTransports","createConfig"]}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@xellar-protocol/indodax-kit",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "exports": {
6
+ "import": "./dist/index.js",
7
+ "types": "./dist/index.d.ts"
8
+ },
9
+ "main": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "files": [
12
+ "dist",
13
+ "README.md",
14
+ "package.json"
15
+ ],
16
+ "devDependencies": {
17
+ "@types/qrcode": "^1",
18
+ "esbuild-plugin-styled-components": "^3.0.1",
19
+ "react": "19.0.0",
20
+ "react-dom": "19.0.0",
21
+ "typescript": "5.5.4",
22
+ "typescript-plugin-styled-components": "^3.0.0",
23
+ "@xellar-protocol/eslint-config": "0.0.0",
24
+ "@xellar-protocol/prettier-config": "0.0.0",
25
+ "@xellar-protocol/typescript-config": "0.0.0"
26
+ },
27
+ "dependencies": {
28
+ "clsx": "^2.1.1",
29
+ "motion": "^11.17.0",
30
+ "qrcode": "^1.5.4",
31
+ "react-remove-scroll": "^2.6.2",
32
+ "styled-components": "^6.1.14",
33
+ "styled-reset": "^4.5.2"
34
+ },
35
+ "peerDependencies": {
36
+ "@tanstack/react-query": ">=5.0.0",
37
+ "react": ">=18",
38
+ "react-dom": ">=18",
39
+ "viem": "^2.22.x",
40
+ "wagmi": "^2.x"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
45
+ "scripts": {
46
+ "lint": "eslint . --max-warnings 0",
47
+ "lint:fix": "eslint . --fix --max-warnings 0",
48
+ "check-types": "tsc --noEmit",
49
+ "dev": "tsup-node --watch",
50
+ "build": "tsup-node"
51
+ }
52
+ }