Code Monkey home page Code Monkey logo

Comments (9)

bumi avatar bumi commented on May 27, 2024 1

Let me know if you have questions. I am happy to help (you can also find me in the bitcoin design slack)

from stacker.news.

bumi avatar bumi commented on May 27, 2024

I was thinking of the most simple WebLN integration. (so without changing the concept that the user has an account and a balance).

we could simply check for webln on the QR topup page: https://github.com/stackernews/stacker.news/compare/master...bumi:webln?expand=1 (pseudo code - because I could not run it)

the idea is, that it checks of WebLN is available, if so it hands over to WebLN. if NOT it shows the current flow with the QR code

from stacker.news.

huumn avatar huumn commented on May 27, 2024

Thanks for this! This is roughly the level of change required to support WebLN? Much less work than I thought

from stacker.news.

bumi avatar bumi commented on May 27, 2024

Yeah, just call some JS instead of showing a QR code. + some error handling (and showing the QR code in the error case)

from stacker.news.

huumn avatar huumn commented on May 27, 2024

Right on, I'll reprioritize this. Might be able to cram it in today even.

from stacker.news.

huumn avatar huumn commented on May 27, 2024

Hey @bumi, deployed this. SN now supports both fund and withdrawals through WebLN. Tested it with Joule - seems to work well. Thanks for giving me the push!

Lmk if you have any gripes.

from stacker.news.

bumi avatar bumi commented on May 27, 2024

whoop whoop! you're fast. works great! 🎉 :shipit:
Though I would only show the QR code if WebLN is NOT available or the WebLN request fails. - I find doing both a bit confusing...

is there a reason why you do it like this? (In my code I tried to do that with the useWebln state.)

from stacker.news.

huumn avatar huumn commented on May 27, 2024

I don't disagree but a blank page is also confusing - in a different way. This is just version get.it.done. On my MacBook Air the popup from Joule covers most of the page, so it also didn't seem too confusing too. Up to changing it though if your experience differs significantly.

from stacker.news.

bumi avatar bumi commented on May 27, 2024

I'd show a loading spinner instead.

Our extension currently pretty quickly closes the popup after confirmation and it takes a second until the payment is done.
So I guess there the QR code is visible longer.
I also think the idea is that most should be handled in the website (e.g. also error handling) - so we do not wait but leave it up to the website.

from stacker.news.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.