lnbits icon indicating copy to clipboard operation
lnbits copied to clipboard

Update phoenixd.py

Open Hodladi opened this issue 1 year ago • 2 comments

Fix for the description_hash with phoneixd server

Hodladi avatar May 17 '24 05:05 Hodladi

Please keep the todo comments - you have not addressed them, so you should not remove them

prusnak avatar May 17 '24 07:05 prusnak

Was it tested? I might have time to test this weekend, and maybe provide a PR if this ones is not ok, but I think this is not going to work since

            data: Dict = {
                "amountSat": f"{msats_amount}",
                "description": memo,
                "externalId": "",
            }

description here - as I understand - should not has memo as value, but rather the expected description_hash, so we should have something like

            data: Dict = {
                "amountSat": f"{msats_amount}",
                "description": description_hash,
                "externalId": "",
            }

Here https://github.com/ACINQ/phoenixd/pull/50/files#diff-154655ec623b797aed456fbb139aba5ea257320178b9574f12f676560f3c3b4c, you can see line -154/+162 that description expects the description_hash

memo is not relevant for phoenixd

Bashy avatar May 17 '24 09:05 Bashy

To clarify my previous comment, it might work but not the expected way where phoenixd actually processes the description_hash

Bashy avatar May 17 '24 10:05 Bashy

It works, I'm running my LNBits instance with that change and it works perfectly.

I'm no python dev so this is probably possible to do better but as I said, it do work.

And as far as I could understand it was just a hard coded exception that was in lnbits code.

Hodladi avatar May 17 '24 12:05 Hodladi

this branch is able to even receive nostr zaps, whereas in #2514 they don't go through.

Alex71btc avatar May 18 '24 23:05 Alex71btc

Closed in favor of https://github.com/lnbits/lnbits/pull/2514

prusnak avatar May 21 '24 21:05 prusnak