getAlby / lightning-browser-extension

The Bitcoin Lightning Browser extension that connects to different wallet interfaces and brings deep lightning integration to the web
https://getalby.com
MIT License
524 stars 192 forks source link

feat: add custom records to NWC connector #3172

Open rolznz opened 2 weeks ago

rolznz commented 2 weeks ago

Adds custom records (mainly used for podcasting payments but could be other things) to the NWC connector.

There is no standard on how these should be passed. In the NIP-47 spec metadata can be returned, so I think it makes sense to keep the custom_records (custom TLVs) in a separate object inside the metadata object.

https://github.com/nostr-protocol/nips/blob/master/47.md

(I will link the NWC PR when it's ready)

Related: https://github.com/getAlby/nostr-wallet-connect-next/issues/444 Related: https://github.com/getAlby/nostr-wallet-connect/pull/251

image image

reneaaron commented 2 weeks ago

Great! Just one little thing I noticed in your screenshot?

Is the encoding somewhat wrong here? (see App metadata)

rolznz commented 2 weeks ago

@reneaaron it's the :zap: emoji. It seems to also be encoded wrongly using the LNDHub connector.

I also saw this check is wrong (it's checking the message but using the podcast) and I can't actually see where the message field is being used - edit: it looks like it's just a bad copy-paste (as per the screenshot the message was not shown)

{transaction.boostagram?.message && (
            <TransactionDetailRow
              title={t("boostagram.message")}
              content={transaction.boostagram?.podcast}
            />
          )}
rolznz commented 2 weeks ago

@reneaaron I wonder if the emoji issue is some side effect of using base64 decoding, do you have any idea?

reneaaron commented 2 weeks ago

@rolznz I'll try to debug it :+1: