From 186f9ca961c4507d4ff04cbb9d2d65818815f842 Mon Sep 17 00:00:00 2001 From: Ilja Date: Fri, 18 Feb 2022 14:17:59 +0200 Subject: [PATCH 1/2] Add more main / test nets --- .DS_Store | Bin 0 -> 6148 bytes wallets/.DS_Store | Bin 0 -> 6148 bytes .../public/chain-logos/eip155-1.png | Bin 0 -> 5102 bytes .../public/chain-logos/eip155-137.png | Bin 0 -> 3136 bytes .../public/chain-logos/eip155-43113.png | Bin 0 -> 5016 bytes .../public/{ => icons}/accounts-icon.svg | 0 .../public/{ => icons}/pairings-icon.svg | 0 .../public/{ => icons}/qr-icon.svg | 0 .../public/{ => icons}/sessions-icon.svg | 0 .../public/{ => icons}/settings-icon.svg | 0 .../src/components/Navigation.tsx | 8 ++--- .../src/components/QrReader.tsx | 2 +- .../react-wallet-v2/src/data/EIP155Data.ts | 32 +++++++++++++----- .../hooks/useWalletConnectEventsManager.ts | 2 -- .../react-wallet-v2/src/pages/pairings.tsx | 1 - 15 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 .DS_Store create mode 100644 wallets/.DS_Store create mode 100644 wallets/react-wallet-v2/public/chain-logos/eip155-1.png create mode 100644 wallets/react-wallet-v2/public/chain-logos/eip155-137.png create mode 100644 wallets/react-wallet-v2/public/chain-logos/eip155-43113.png rename wallets/react-wallet-v2/public/{ => icons}/accounts-icon.svg (100%) rename wallets/react-wallet-v2/public/{ => icons}/pairings-icon.svg (100%) rename wallets/react-wallet-v2/public/{ => icons}/qr-icon.svg (100%) rename wallets/react-wallet-v2/public/{ => icons}/sessions-icon.svg (100%) rename wallets/react-wallet-v2/public/{ => icons}/settings-icon.svg (100%) diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..14df089a0021f7261f5a4794ea06f3e725b87257 GIT binary patch literal 6148 zcmeHK!EVz)5S>jEVyi;Rp-8jr?p`b_=7ZcJ02QD>&1EAEdBd~D2QS9JD6v=1! z7_NK?zXNY}H>gc$j}b*P*6f>|o!PbDu6Dgdq=xhKF;S0*JSbz!NAVZocGeAPIZp?u zOdsXTTwf%)PBvo2@ozG~bJwAiVw&Q)I)A(*oL%O8&%8YZy z_qB{J)#y9NGofm|fA#S8=%g;EZZ-W#rg>IY{r*qY+G%(0b-k{)>wSnm={l<7YF-ZG z**mVi);dpCcAUJ)CiS?t_d*v{oE4LqNyyR(Lf*g4id5G_JulMI68BQAXuCn_t_pSm%jJl(b2QB@#p-q&|eKNq_F;t+;_NwZ!p$4_!7;ETo)hF zvdUUT3kn0mfH1Hf2HfuB?QUl{8ATWn2JR38ygvj`#?WD7(QF+k%oPCGhT8~i{te`u zz+vdHv4|FkvZ+9us@xSr*>v~=7Z*BgEZTHZ?((7B$jaSNlo=iU2PT|UXi-XGKp42r zz>cl<`20V;`Tl=BNovA?Fz{b7pxUEoG{h&lvvuR+_^b_}=TH`oYb^drfnknf#PU(R b4>baRzy>gM*jR)IB0mC#1}TJrtupW%H-B-4 literal 0 HcmV?d00001 diff --git a/wallets/.DS_Store b/wallets/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..69ba1e1b750cf38fa0c4d89ef4ea72042bb9527d GIT binary patch literal 6148 zcmeHKO>fgc5S>i|byT6|K&2inaSha@C=%l0hH~JFQ8~0#YS$LEFy1P5>O&OCXZS<> z68;Xn+1;R4E$Xdbnz3fzcy?y(eQWJ{h)7N5>1(0^5qVI?P9M!R!u_mQq~knYpfY3B z^pYBislX-j5E$UK+n^a`ShW+nxPF%w_*d z&WgOMgW$L7bbC*pu6b+Tx_1L#k=dR|T9*#X~u*1AYmcAV_zSu-6xf3M3r&dY3O z67n=d$l;f~Om#ES^D?bWZe%;WzSo})wib)=cr^6i>;%i9zj!+e*d8yJeQ)!{_PbBh zZ^idg|1k3)g>Tr%Glwhq3F8Ki&ZAjb=<+KfSEH=51%&}&Kp41x47i=jTfcv=CT}DR z2m^P_0PhbzlrePJS~Ob+8dCxQdvF_p%|D5p<2wu;wieL?Q8pE5Q)R4aH|ab E1=7x6&;S4c literal 0 HcmV?d00001 diff --git a/wallets/react-wallet-v2/public/chain-logos/eip155-1.png b/wallets/react-wallet-v2/public/chain-logos/eip155-1.png new file mode 100644 index 0000000000000000000000000000000000000000..ca51f566afca092116796e035b4603d8f1230f60 GIT binary patch literal 5102 zcmXw7bzBrt*Pf+21W}L{r8^c>1eS&c5v3IAR3roe>4haFq`Ol@K)O>>8l(iIn+=*J z_Fdoi`{p-u?m2g!bDn3;z4xC9*U?s`Bx5220Dw|mO-UCw2K;+S@NxEdIraiK5ZEec zDFDEa81gG~LR<`T)m4Q6-V6L&3H&|XizH`jg$@ztkuOGjF05=bhub;oSk8en5 z*n@`;17Lw%54bL_uKfdGLc+pln9GZ6>=hR4=N}Lp5-RiP(bmo`9X&ng{reBOAEswy z-oAZX3JhLZTmRSjqhoOiiSHGae^=KUn_GVN_2cAi@9i)CU9M|vd@3i0`*0>ErjxVt z;;*GA7nr_*!MuXP;nA^IuZ;_fOQxo0NJvNs2??X3VU07va)_~a~l{MexawA zm6H>fka%`^m6)8&!NKuo=`ZT|WMb;Kn!37&=cgyKvdStd8{0dxe-_Be$){)MKDv8o zX=}H4b}1<l8e`mdH8U*&Rad++m41>`)=U8j0>z?80PcBptd*nx`bm9ZY2d0L?vhC54xs^EGLt zI`p;-eR8>}tX2#(3R9j5;E3M)N-YoxkI36};DM#|DaR8Ew=)WSi6N1Zp^+Vtg+2lr z`WhuQMizZ#RK%UEuyO-vzEYIYVga;2qF1bWZfy_b=4^wx6e;?~Gnkipws(eYKWm#I z=>UZ6?P|6zBO6jKXg`NWnlwcgs5v59#=|u^H~adAQCA|5)X4mjG&kk4a5OvzdTwLo`|L&rNLnrPvVwE+l2s#_fnhO2H zQYrm;*TV}r=>4KH#TVXB#uKc7>+TRLjD>tSL)G`5-mKD*ve8$w5AH)d^KaU| z@x1$J{+VCv>S=3id^YO%rfG$CR!bJBU+;$?b8 z9>bd_CO&G;jgZ8^jxs|lrCvLrI0Pku6wh|SF|tls09c-}ywHFy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%i$H#2|?s#Q&8WM zr6d&-Js3yUnlp4rDB#l*%-Hc#YsM?XK72Jy5@S}K+Qajg>&4jUdlrc>r3^b4HVVND z-e$sb_zXhkq%)lGMtXZGZcgp&LB@0hZNMIsf7OS1tVB;Kak|XHBP2h zlgfM;|J!S8R<#2wr~TT6o=V8Sj=+(cf-UCIp>b{L6T2oOF=>6Z_m`|`LOKCm#&*5S zZA=iXT?f#5 z%B`~r{Bfy=EsSndo^ZEt!?ML!3E>XL?^k2y>bIoMQpZZFqB}#Ksy10X%Vr-umR(2O zhnDbQI`Sb7dFwJUcRY`Kd@Zdn)!rY+J`=x=j?|1QQ`r8vhSvR>%Fx#tVxnv@f6E|^ zsX3(aHP_|cdzU?C7VSLdMPd=tLZ_cmjGJ9kXVi?tj>cSXWX`YPBw(X3#fl;u(RO?5 zcd1zI&DG}g5AhSL#`B~R2_Y)&&*Rd@n&?A+xlUX^N7qudSNpr3)g7o;Y#Hn})#zg$ z4#+AHO{l%DWyljV^@G$2@_&iP%Hf@d`&?nyPi6Z~2kTqT@uDqO2WR-!g}D#ZWe57O d`QMtc0OvZU9BN?3iTf`Bs4HtLl|#$|{{z?CNLv5^ literal 0 HcmV?d00001 diff --git a/wallets/react-wallet-v2/public/chain-logos/eip155-137.png b/wallets/react-wallet-v2/public/chain-logos/eip155-137.png new file mode 100644 index 0000000000000000000000000000000000000000..1b0e56b62e7a3b0e384f10628992fbaf59033f00 GIT binary patch literal 3136 zcmcJR`9BkmAIG;c*IE;E<*FF@0d^>Sc3kCN8!xcw1un=!LBd_RU&8SAQv zi3*G1Q-Q_AaH1|C6}aqoIq^H(*O4Lf1BmJuzXI9JFS6_}WKaT>vgjF35rVA)k_W*< z2L#$t@M?O{;pci+RCvdk=wTF)JsuYF_5THs2#a5#pl-+GJ=vO;3_|GexMU`gsJ*@m zkbD0mL`SIb;rp}XnLC$dusLgH{4$nfvdo34;n%x2G!vV6k!aLel@hoI$nimoNB2Y3 z&LMhh(m7Rg&~!}YAw&a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Ms0R z)|^M}gT^!c{Y*SvrcQyxLhuwY=kQDe<;Toek@dy)A#8q=8=!H%{YqNx^w$ZD;sbZ- zTWgrshGuj}d2MZ@PKiD=i{$>rt{5SxI(XN9L?RXOHdiF@r|;>7pd408WYuj!%;@r- zC$sBPFeBprOPRULSMpXqh_p{B%gG$Jz@v1`4}smu$GxqXr0SnCpC-9C#b3E5Hm=)UiFG`FASR}S*KN#fa^QWtz^&)TR?0Z$ z-LgaXee$odxSN7kJi2?7H#chn5`mji9a|ipE^X{l*L(#`EGj=l<&Cz7-mtf{GY!C!fy|x3Ox3*n6&h&z;QbpMW^asOWrmDhTM ztYl4mKe?Wc%D=D5J-Vn3rg()v4JUV!8}?m9I&t=L=Vga~^)W=2!;1XH zq{Z_AHr-o6FD*^K&+4r~Bzb9U_3Po8eOaF1;EmcQzDSiEHpA9NjzSknEwC0i8}yWa zEVgv*vwq&NGq(YUIbbqJD%oD(>f>^@tkU)*eH-E4$hwVd(J-)dh^1)|Qc#r&`=XLO zjx6Nuy@)M0=$9C!CY<^R5uM1-sou#p*#C&#dO!imj-Y_;U**W?{J+^&Z zm~DPPvw2=>GtH*WB~~ literal 0 HcmV?d00001 diff --git a/wallets/react-wallet-v2/public/chain-logos/eip155-43113.png b/wallets/react-wallet-v2/public/chain-logos/eip155-43113.png new file mode 100644 index 0000000000000000000000000000000000000000..c35df44de74c2978fc747aacc81da27a378a62ee GIT binary patch literal 5016 zcmV;J6KCv+P)(ZK~#7F?VSsJ zRMnlwf9KqJW+sGp0z$ztX9gp7VbnfdRToG1d$KYef-$n@f)I@|7#;q zlOWp1kLw_)Rseg6?0t>|zwkyK z^kRZsueR>o{^9tKKaRpdI6?sU&Xaq}%4YJ^y+{Jn_|)9L`8_^W zTT}DbiJLdaU~_CO0DDVH#>U+4TSY>j&Fl3^u-l;b2(eBf-)BAISugP9kgBRrVN+}; z0Cd@9T1{Qu*}9ZBOA;6InW1ntHA0BTNs8YWu3fv4j|n!yHUdDQkgFc<$-2;g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ffGLo&D(E`1_q0pF^kd?XR zz#RAnd)F<+f=ms*BBLp;!y=KLc^>yv7OR}MFyqi4bkLkk4!$Deec1}utl1YAVh#(z z^XP|mn&S|H@JJvYU)m9r%Pgie<{ML4xwpNwbx}fKg%u^|0~Vh1HHf=ie(xRmufJXg z6EM9d7PiP-#hfefQqa%@LVIr1vY1khMO=jir*SsE_g&e&@DxF7G zOXy1r!(r2lDJ|*EIwTT#&#lRF3Gwf__(88U^DTLo9?UDXV(=A~Z(*@J6bcC;e#tL= z3UU~zJA%KH52T*>$B~hUr7ioivWLm`P^ic+v|G`UTQCSmHMF1ox+@Y*4J(pO(BQ<-pirQ zNqlNRS0t-iJ)sCeI>Tp#)?8ASFLo6d&rEPaNO$PpgRok6E3MuXzxo+KCyxiH!3bO0A z(FQx&f8Y|@bu1PO`Qb=72m$&;hkVXWiARS=A|Jt~*jfO-WXII0ez(szTaZ}5)9A%~ zDhutk`-X4rT>|12cHX~SIBeJ&@ys(Z*c?X)z~S%`;ji1fH>495^A|pamx=K_t!CwO zD5o7SQQM^y{~ITI@u1iH+W6J09Tod}-9*1&XS<84hCi8$C$3vrbo;2gL z?dLzcg_rRS(Dgt0qS0`{h7Gpbc{NoWF93(5EQ#%{+OU9IFVbB!R@1a&bzL9Nx9M1+ zf>8qbJZl7bDe?2wYF~P_d%BuF68s~knkn(%HuLodcn#mhg0+LS_H86-m(a8wG9It1 ztF7HPar0)|PwmMvpah^dX!&xvbIlrWAQ14>#pCXRm`4Wv3FGst9R$3IM1n^(zPG6< iRy=QBn_bK_v-y8ss5D - accounts icon + accounts icon - sessions icon + sessions icon @@ -37,13 +37,13 @@ export default function Navigation() { - pairings icon + pairings icon - settings icon + settings icon diff --git a/wallets/react-wallet-v2/src/components/QrReader.tsx b/wallets/react-wallet-v2/src/components/QrReader.tsx index cfb07f2..632d046 100644 --- a/wallets/react-wallet-v2/src/components/QrReader.tsx +++ b/wallets/react-wallet-v2/src/components/QrReader.tsx @@ -57,7 +57,7 @@ export default function QrReader({ onConnect }: IProps) { ) : (
qr code icon { const { metadata } = pairing.state - console.log(pairing) return ( Date: Fri, 18 Feb 2022 14:53:57 +0200 Subject: [PATCH 2/2] Add readme --- wallets/react-wallet-v2/README.md | 45 ++++++++----------- .../hooks/useWalletConnectEventsManager.ts | 2 +- .../src/utils/WalletConnectUtil.ts | 2 +- 3 files changed, 20 insertions(+), 29 deletions(-) diff --git a/wallets/react-wallet-v2/README.md b/wallets/react-wallet-v2/README.md index b12f3e3..fc2a157 100644 --- a/wallets/react-wallet-v2/README.md +++ b/wallets/react-wallet-v2/README.md @@ -1,34 +1,25 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +# WalletConnect React Wallet Example -## Getting Started +⚠️ Wallet should only be used as a refference example & for development purposes
+🔗 Live app - https://react-wallet-v2.vercel.app
+📚 WalletConnect docs - https://docs.walletconnect.com/2.0 -First, run the development server: +Example wallet implementation using [WalletConnect](https://walletconnect.com/), [Ethers](https://docs.ethers.io/v5/), [React](https://reactjs.org/) and [TypeScript](https://www.typescriptlang.org/) -```bash -npm run dev -# or -yarn dev -``` +## Getting started -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +This example is built atop of [NextJS](https://nextjs.org/) in order to abstract complexity of setting up bundlers, routing etc.. So there are only few steps you need to follow in order to set everything up -You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. +1. Go to [WalletConnect Cloud](https://cloud.walletconnect.com/sign-in) and obtain a project it +2. Add your project details in [WalletConnectUtil.ts](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/utils/WalletConnectUtil.ts) file. +3. [Optional] To use project id as environment variable follow [NextJS environment docs](https://nextjs.org/docs/basic-features/environment-variables) +4. Install dependencies `yarn install` or `npm install` +5. Run `yarn dev` or `npm run dev` to start local development -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. +## Navigating through this example -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +1. Initial setup and initializations happen in [_app.ts](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/pages/_app.tsx) file. +2. WalletConnect client and ethers wallets are initialized in [useInitialization.ts ](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/hooks/useInitialization.ts) hook +3. Subscription and handling of WalletConnect events happens in [useWalletConnectEventsManager.ts](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/hooks/useWalletConnectEventsManager.ts) hook, that oppens related [Modal views](https://github.com/WalletConnect/web-examples/tree/main/wallets/react-wallet-v2/src/views) and passes them all necesary data. +4. [Modal views](https://github.com/WalletConnect/web-examples/tree/main/wallets/react-wallet-v2/src/views) are responsible for data display and handling approval or rejection actions. +5. Uppon approval or rejection modals pass request data to [RequestHandlerUtil.ts](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/utils/RequestHandlerUtil.ts) that performs all necesary ethers work based on request method and returns formated json rpc result data that can be then used for WallteConnect client responses. diff --git a/wallets/react-wallet-v2/src/hooks/useWalletConnectEventsManager.ts b/wallets/react-wallet-v2/src/hooks/useWalletConnectEventsManager.ts index 18bd9c2..8c4358e 100644 --- a/wallets/react-wallet-v2/src/hooks/useWalletConnectEventsManager.ts +++ b/wallets/react-wallet-v2/src/hooks/useWalletConnectEventsManager.ts @@ -14,7 +14,7 @@ export default function useWalletConnectEventsManager(initialized: boolean) { }, []) /****************************************************************************** - * 2. Open session created modal to show success feedback + * 2. [Optional] hanle session created *****************************************************************************/ const onSessionCreated = useCallback((created: SessionTypes.Created) => {}, []) diff --git a/wallets/react-wallet-v2/src/utils/WalletConnectUtil.ts b/wallets/react-wallet-v2/src/utils/WalletConnectUtil.ts index 6d1e75a..66fb425 100644 --- a/wallets/react-wallet-v2/src/utils/WalletConnectUtil.ts +++ b/wallets/react-wallet-v2/src/utils/WalletConnectUtil.ts @@ -5,7 +5,7 @@ export let walletConnectClient: WalletConnectClient export async function createWalletConnectClient() { walletConnectClient = await WalletConnectClient.init({ controller: true, - projectId: '8f331b9812e0e5b8f2da2c7203624869', + projectId: process.env.NEXT_PUBLIC_PROJECT_ID, relayUrl: 'wss://relay.walletconnect.com', metadata: { name: 'React Wallet',