diff --git a/README.md b/README.md index 6b4a863..3fed01e 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,10 @@ Bitcoin Connect exposes the following web components for allowing users to conne - `` - render the list of connectors on their own - _more components coming soon_ +##### Common Attributes (can be passed to any Bitcoin Connect component) + +- `app-name` (React: `appName`) - Name of the app requesting access to wallet. Currently used for NWC connections + #### Window Events Bitcoin Connect exposes the following events: diff --git a/demos/react/src/App.tsx b/demos/react/src/App.tsx index edc8604..fbc573f 100644 --- a/demos/react/src/App.tsx +++ b/demos/react/src/App.tsx @@ -9,16 +9,20 @@ function App() { React.useEffect(() => { (async () => { - const ln = new LightningAddress('hello@getalby.com'); - await ln.fetch(); - setInvoice( - ( - await ln.requestInvoice({ - satoshi: 1, - comment: 'Paid with Bitcoin Connect', - }) - ).paymentRequest - ); + try { + const ln = new LightningAddress('hello@getalby.com'); + await ln.fetch(); + setInvoice( + ( + await ln.requestInvoice({ + satoshi: 1, + comment: 'Paid with Bitcoin Connect', + }) + ).paymentRequest + ); + } catch (error) { + console.error(error); + } })(); }, []); @@ -45,7 +49,10 @@ function App() {
diff --git a/demos/react/yarn.lock b/demos/react/yarn.lock index c354fa3..d6c62e0 100644 --- a/demos/react/yarn.lock +++ b/demos/react/yarn.lock @@ -257,9 +257,9 @@ integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== "@scure/base@~1.1.0": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.2.tgz#ff0cf51874aaf176490c9cb46e4df807a2e581d2" - integrity sha512-sSCrnIdaUZQHhBxZThMuk7Wm1TWzMD3uJNdGgx3JS23xSqevu0tAOsg8k66nL3R2NwQe65AI9GgqpPOgZys/eA== + version "1.1.3" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.3.tgz#8584115565228290a6c6c4961973e0903bb3df2f" + integrity sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q== "@scure/bip32@1.3.1": version "1.3.1" @@ -381,9 +381,9 @@ integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== "@types/trusted-types@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.3.tgz#a136f83b0758698df454e328759dbd3d44555311" - integrity sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g== + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.4.tgz#2b38784cd16957d3782e8e2b31c03bc1d13b4d65" + integrity sha512-IDaobHimLQhjwsQ/NMwRVfa/yL7L/wriQPMhw1ZJall0KX6E1oxk29XMDeilW5qTIg5aoiqf5Udy8U/51aNoQQ== "@typescript-eslint/eslint-plugin@^6.0.0": version "6.2.1" @@ -1374,8 +1374,8 @@ yocto-queue@^0.1.0: integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== zustand@^4.4.1: - version "4.4.1" - resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.4.1.tgz#0cd3a3e4756f21811bd956418fdc686877e8b3b0" - integrity sha512-QCPfstAS4EBiTQzlaGP1gmorkh/UL1Leaj2tdj+zZCZ/9bm0WS7sI2wnfD5lpOszFqWJ1DcPnGoY8RDL61uokw== + version "4.4.2" + resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.4.2.tgz#e26ad331d0a2e28a7d4aa126b00c7140b34904bb" + integrity sha512-qF3/vZHCrjPUX5DvPE3DPDZlh+FiAWRKlP9PI7SlW1MCk8q4vUCDqyWsbF8K41ne0Yx8eeeb0m1cypn1LqUMYQ== dependencies: use-sync-external-store "1.2.0" diff --git a/dev/vite/index.html b/dev/vite/index.html index 5ba361c..5b76eaf 100644 --- a/dev/vite/index.html +++ b/dev/vite/index.html @@ -107,9 +107,8 @@