Skip to content

Boltcard Wallet Mode - B2B Payment (Boltcard2Boltcard)#35

Open
X-Hades-X wants to merge 32 commits intoSwissBitcoinPay:mainfrom
X-Hades-X:main
Open

Boltcard Wallet Mode - B2B Payment (Boltcard2Boltcard)#35
X-Hades-X wants to merge 32 commits intoSwissBitcoinPay:mainfrom
X-Hades-X:main

Conversation

@X-Hades-X
Copy link
Copy Markdown
Contributor

@X-Hades-X X-Hades-X commented Mar 19, 2025

#34 (comment)
Having a Boltcard is fun.
Having friends with Boltcards is even more fun now.

Tap the Boltcard, request or send Sats to another Boltcard.

What changed to make this possible?

  • Refactored the NFC Loop. It now only reads NFC and does nothing else.
  • New Screen Decoder:
    • After Scanning a Boltcard or a QR code with the camera containing a LNURL/LN-Adress/BTC Adress or invoices without amount a Decoder Screen opens to give the User the option to send or recieve to the scanned address (if enabled for the given address)
    • the limits recieving/sending are shown on the screen
    • buttons are only shown if the action is possible
    • scanning a lightning invoice with an amount still directly opens the Invoice Screen
  • New Screen Wallet:
    • After choosing recieving/sending a numpad with currency selection is loaded. The user can enter Fiat or Bitcoin value. If Fiat is selected, the Bitcoin value is shown in Sats at the bottom of the input
    • if the User is sending and the amount surpasses the pinLimit, he must enter his PIN to proceed
    • Fiat amount can only have 2 decimal points, SATS amount none, and BTC amount 8
    • Amount is spaced like 1 000 000, 10 000 000
  • Updated Invoice Screen
    • Show a QR code to pay with a different device, since now it is possible to create such a QR code by tapping the Boltcard in the App.
    • tapping the QR code copies it into the clipboard
    • Shows fiat amount if it was selected in the wallet
  • Updated Payment Success
    • Shows the Fiat amount if it was selected in the wallet

Problems

  • I somehow don't like the design, but I can't put my finger on it. It's kinda hard to design a "Wallet" that doesn't have your current amount (only limits) or payment history
  • For my life i was unable to style the Select correctly. It seems impossible to make the text color white or align in the middle
  • I recieve sometimes bitcoin from an exchange directly via lightning. Sometimes it has issues to get the invoice, sadly I never had the chance to debug it correctly. Otherwise it seems to work with every LNURL, lightning invoice or LN Adress I throw at it (i use this thing now for months, never got around for the last style fixes but I tested it a lot)
  • The Bitcoin Swap seems broken, but thats on your side; is the service still active?

Outlook

  • Adding a comment when creating an invoice or sending to an LN Adress
  • Spinning up an anonymous nPub and zaping another nPub on Nostr
  • Local Setting to keep prefered fiat and maybe other stuff between start
  • Loading eNuts and claim with the boltcard

@X-Hades-X
Copy link
Copy Markdown
Contributor Author

Had time to clean things up. Looks finished for me so far:

  • Payment to Bitcoin Address works now, if no amount is in the read data (Clipboard or QR) the user can enter an amount before starting the Loop Out process
  • Design leans on the existing Invoice screen with Label/Value rows
  • Card Limits are hidden when opening the Wallet screen, can be shown by touching the 'Show information' row
  • Send/Receive Buttons are now the same round type as the Scan QR Button at the start, just smaller
  • Fixed some issues, now every type of payment works (the ones I tested, and I think I tried everything once)

The select is still what it is. The styling in React is somewhat confusing.

@X-Hades-X
Copy link
Copy Markdown
Contributor Author

  • Select looks nice now, users can also pick the default currency on the homescreen and it persists when closing the app
  • Bitcoin invoices without amount are now routed to the Wallet Screen to enter an amount; Lightning invoices can't be paid without an amount (yet) and it navigates back to the homescreen displaying an error
  • If an URL in the form of https://yourweb.site/something/?lightning=LNURL348... is scanned the LNURL is parsed and validated
  • Cleaned up some changes made during development that weren't needed

It's a lot of code. I tried to preserve as much of the existing code base as possible; maybe only moved it somewhere else (for example moved handling of calling the server when decoding an LNURL out of the readNFC)

I test it where I can in the wild, but there is always another PoS (what a pun opportunity) around which does something slightly different

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant