-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Bitcoin Connect #343
base: master
Are you sure you want to change the base?
add Bitcoin Connect #343
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I think the |
also, can you introduce what is this Bitcoin Connect trying to do? |
Includes button and Modal to connect Lightning wallets. Here is the repo of the component: https://github.com/getAlby/bitcoin-connect.git |
@digi-monkey Can we add a githook with husky to compile react before deploy to check for these errors?
|
sounds cool, so this can enable users to zap in their mobile phone? |
yea I think we need a CI that can run for every PR. I am not sure if we should do it in the .husky like every pre-commit we should run |
|
||
<List.Item | ||
actions={[ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key={'btc-connect'} |
this should fixed the compiled error
Yes, with BitcoinConnect users of Alby, Mutiny or Umbrel wallets can zap on mobile in the PWA. |
2023-11-29-15-48-16_eC16on8h.mp4 |
package.json
Outdated
@@ -112,7 +113,7 @@ | |||
}, | |||
"scripts": { | |||
"wasm:profile": "cd wasm && rustc --crate-type cdylib --target wasm32-unknown-unknown -C lto -C opt-level=z -o profile.wasm examples/profile.rs", | |||
"dev": "REACT_APP_COMMIT_HASH=$(git rev-parse --short HEAD) next dev", | |||
"dev": "set \"REACT_APP_COMMIT_HASH=$(git rev-parse --short HEAD)\" && next dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be undone, right?
const BitcoinButton: React.FC<BitcoinButtonProps> = ({ isDisabled }) => { | ||
const handleConnect = () => { | ||
if (!isDisabled) { | ||
alert('Connected!'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think an alert it is needed
@@ -14,6 +14,7 @@ import { joyIdConfig } from 'core/joyid/config'; | |||
import Head from 'next/head'; | |||
import theme from 'constants/theme'; | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To resolve - why could you not import bitcoin connect here? it's needed so zaps work on every page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Alan-AC7 For NextJS you can add this to src/components/PostItems/PostReactions/index.tsx
to only import the library clientside:
useEffect(() => {
// load bitcoin connect for zaps
import("@getalby/bitcoin-connect-react");
}, []);
src/styles/global.scss
Outdated
@@ -162,3 +162,14 @@ | |||
text-overflow: ellipsis; | |||
white-space: nowrap; | |||
} | |||
|
|||
:root { | |||
--bc-color-brand: rgb(89,128,34); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need to re-declare the color? isn't it already declared somewhere in the site's css? is it one of the primary hex colors?
Includes button and Modal to connect Lightning wallets. with BitcoinConnect users of Alby, Mutiny or Umbrel wallets can zap on mobile in the PWA.
Here is the repo of the component: https://github.com/getAlby/bitcoin-connect.gi