Skip to content
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

Zaps using ligess not working #1397

Open
mutatrum opened this issue Aug 31, 2024 · 17 comments
Open

Zaps using ligess not working #1397

mutatrum opened this issue Aug 31, 2024 · 17 comments

Comments

@mutatrum
Copy link

When trying to add the NWC string from my ligess instance, it is not accepted and [invalid NWC URI] is logged.

The format is:

nostrwalletconnect://9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b?relay=wss://relay.hodl.camp&secret=######

This URL works in Amethyst, but it's not clear why it's not accepter by nostter.

@SnowCait
Copy link
Owner

NWC protocol is nostr+walletconnect://, not nostrwalletconnect://.

@mutatrum
Copy link
Author

mutatrum commented Sep 1, 2024

Fixed the URL, which is now accepted by nostter. However, if I zap a note, nothing is coming in to my zapper relay.

image

After this the logging stops. I tried zapping the same note on Amethyst, and I see the invoice being sent to the zapper relay to be paid.

I renamed the issue to track general compatibility issues.

Awesome client btw to be able to handle 2500 follows.

@mutatrum mutatrum changed the title [invalid NWC URI] when using Ligess NWC url Zaps using ligess not working Sep 1, 2024
mutatrum referenced this issue in mutatrum/ligess Sep 1, 2024
@SnowCait
Copy link
Owner

SnowCait commented Sep 1, 2024

wss://relay.hodl.camp seems to refuse the connection due to AUTH.
Is this behavior intended?

@mutatrum
Copy link
Author

mutatrum commented Sep 2, 2024

[edit] changed a bit, had to re-read stuff as I implemented it ages ago.

Yes, that is intended, as it's a relay only used for zaps so it want to AUTH the user. I can disable it to test it, but I think it's prudent to have the relay shielded off a bit more.

It used to be mentioned in NIP-57 IIRC, but in the current version of the NIP it's not mentioned anymore, not sure why?

@SnowCait
Copy link
Owner

SnowCait commented Sep 3, 2024

Okay, I'll support AUTH on NWC.

@SnowCait SnowCait mentioned this issue Sep 3, 2024
@SnowCait
Copy link
Owner

SnowCait commented Sep 3, 2024

Done. Could you please check?

@mutatrum
Copy link
Author

mutatrum commented Sep 4, 2024

I've added logging on my side, it looks like it connects to the relay and sends the encrypted invoice but no NIP-42 AUTH response yet. I cleared my browser cache to make sure I have the latest version.

Sep 04 10:29:57 hostname ligess[719002]: {"level":30,"time":1725438597077,"pid":719002,"hostname":"hostname","reqId":"req-2","req":{"method":"GET","url":"/relay/","hostname":"relay.hodl.camp","remoteAddress":"127.0.0.1","remotePort":39516},"msg":"incoming request"}
Sep 04 10:29:57 hostname ligess[719002]: {"level":30,"time":1725438597078,"pid":719002,"hostname":"hostname","reqId":"req-2","msg":"Sending AUTH request"}
Sep 04 10:29:57 hostname ligess[719002]: {"level":30,"time":1725438597086,"pid":719002,"hostname":"hostname","reqId":"req-2","msg":"Message received","message":["EVENT",{"kind":23194,"created_at":1725438597,"content":"L19DkAAZ7RP8Pg9Whs7zwfC8V9c30Rr28mU9JRXrwkxShZs1WDswepavJwPgyPPTmcgMWQ0p5Q3yrY7qe5oihnoz5NAj2m6k1LEzs4g9xMT7xYKw1cQ+6mQ10FOLHQ8jpgRpzc32f/PwFm/hCr+pG7N26YNKyPiBbMcK+Ka7P/gRxEKkXr5AwmReCCwbsFAaXy3NMesC3dfeRIeYXOClACzko/PCj3tB7lMMVmVIdUwh+nqVduW3rgwrQeMOBWP30u4uVGgyBogPccxzmuNRBUjjUL+tqCL8DC5nKPZdfnsem9HzY2eypISpyp1QeMweih/NJ4bWmoL3tTZKsaO6ABMvB4DwhMzsGHzIvC0Kk3KvOlBo8SAf/WrTS45vjp//1eSgaLkDlJGJilYQ4AIW3NR64fvs/xVkpDgvE9LuAcTD+M5P2naibYDL84zB20pNZ+MfKDo4pcLjo4JfSaFdpdHp9hE4PsjJGXrezn3nRso=?iv=HRQ2or0Jnb4y7reSRJmH+Q==","tags":[["p","9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b"]],"pubkey":"9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b","id":"f00fced49d096c268f6ad8b53be036d4c1746755bacd9289de7852932f11a141","sig":"c4d4056512beec0ef23d30607c2bde51d33f23841d71a2d6eda9cb7de118e659421ae3d422cecba67d769a17010ec75dbfce4b35ca5209f6927a30385803d8ac"}]}
Sep 04 10:29:57 hostname ligess[719002]: {"level":30,"time":1725438597086,"pid":719002,"hostname":"hostname","reqId":"req-2","msg":"Message received","message":["REQ","696756:0",{"kinds":[23195],"authors":["9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b"],"#e":["f00fced49d096c268f6ad8b53be036d4c1746755bacd9289de7852932f11a141"]}]}
Sep 04 10:30:07 hostname ligess[719002]: {"level":30,"time":1725438607080,"pid":719002,"hostname":"hostname","reqId":"req-2","msg":"Closing idle connection"}
Sep 04 10:30:07 hostname ligess[719002]: {"level":30,"time":1725438607087,"pid":719002,"hostname":"hostname","reqId":"req-2","msg":"Connection closed","code":1005,"reason":{"type":"Buffer","data":[]}}

It holds off on processing the invoice until the AUTH response is received, and the connection is closed after 10 seconds if this doesn't happen.

@SnowCait
Copy link
Owner

SnowCait commented Sep 4, 2024

Hmm... I'll check it out.

@SnowCait
Copy link
Owner

SnowCait commented Sep 4, 2024

Sorry, I had the wrong option, could you please check again?

@mutatrum
Copy link
Author

mutatrum commented Sep 4, 2024

It works 🥇 Only thing is that the zap dialog stays open. On refresh the zap is shown on the notifications of the note.

Sep 04 13:28:07 hostname ligess[719002]: {"level":30,"time":1725449287657,"pid":719002,"hostname":"hostname","reqId":"req-22","req":{"method":"GET","url":"/relay/","hostname":"relay.hodl.camp","remoteAddress":"127.0.0.1","remotePort":34628},"msg":"incoming request"}
Sep 04 13:28:07 hostname ligess[719002]: {"level":30,"time":1725449287658,"pid":719002,"hostname":"hostname","reqId":"req-22","msg":"Sending AUTH request"}
Sep 04 13:28:07 hostname ligess[719002]: {"level":30,"time":1725449287665,"pid":719002,"hostname":"hostname","reqId":"req-22","msg":"Message received","message":["EVENT",{"kind":23194,"created_at":1725449288,"content":"047sZ0dvhq2NHaeV/Itnclyo5L/EtXbXULNY4uQY1jBS+kwNcTp9Ip9W/l9P/OH0ZcGbdR9Djiwe2fmpnAfPQM/6GG7+2Mf/0LD6imn9hl5laNc+tNGv4FtzKw+oloDvtI2oGygl/Neyq/u2ywvfnm9pEk/5Gj4P+GDs5+WTa9awpKn322Wmq1tZWCRUa2RZlmbKITC4S+dx1rYuYl3MuBoiN9qCjHGXnXMBxU9jKVE2AIWKgYXiaEaVBE9dOOBM8QGHG0y/l6Vs2T0YSNBfRq//JVpbUz6rqvo+AgoJfPxISvH6PHWKeBG5mqgZsz7FmLeW+6crIExz56hNpG2eDzSkk0IAC9dEyIisLre5VrgRO51CHN/67yEJUWFtL6IGadiKPavNzpnGockkQ3UmikKSDRwhKGfWOh40fPoGWhs6gDRcV9MRTF4kuTGny2H4LlPuNK8gFbHmy7biouH7Tjygyp029aqfyi+c0wsJdyM=?iv=Z3GQmOu1gDDEq+p7z//2lw==","tags":[["p","9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b"]],"pubkey":"9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b","id":"cb2cf7ce1a55aab8ff88168e805c6807443b2d9598a66c73c2cebf0a773efe9d","sig":"fdfedbee88f4e069fbf2a64c0da644d8533bb8c97c71a1b7e532aba9fc133cd21b20a16b749be5fadefededa3fac63737a338f92f76a8b9bcc37d81937649c50"}]}
Sep 04 13:28:07 hostname ligess[719002]: {"level":30,"time":1725449287665,"pid":719002,"hostname":"hostname","reqId":"req-22","msg":"Message received","message":["REQ","726754:0",{"kinds":[23195],"authors":["9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b"],"#e":["cb2cf7ce1a55aab8ff88168e805c6807443b2d9598a66c73c2cebf0a773efe9d"]}]}
Sep 04 13:28:07 hostname ligess[719002]: {"level":30,"time":1725449287673,"pid":719002,"hostname":"hostname","reqId":"req-22","msg":"Message received","message":["AUTH",{"kind":22242,"content":"","tags":[["relay","wss://relay.hodl.camp"],["challenge","54c8b141290c97c8a5bdfc9d2849be49c52aa80f"]],"pubkey":"9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b","created_at":1725449287,"id":"673261045313b5af7d136d84a4a8975e249ccb6594394f0366cc8ac24a9700d9","sig":"d7d88fdbc922d1b1fb2b0f88e4b59ace042b3c4122e083bb1b57e1bde4c7b3b4b9efd13566faf41a82191a7f0729070ccdc9f69c7db613135e4d301f875b6f0d"}]}
Sep 04 13:28:07 hostname ligess[719002]: {"level":30,"time":1725449287682,"pid":719002,"hostname":"hostname","reqId":"req-22","msg":"Connection is authenticated: npub1n5x0cyqxhaahzt9mnnx8xqqqehemrl8ky2j5r7kl0fpj59sfkuasxasqwz"}
Sep 04 13:28:07 hostname ligess[719002]: {"level":30,"time":1725449287689,"pid":719002,"hostname":"hostname","reqId":"req-22","msg":"Pay request","content":{"method":"pay_invoice","params":{"invoice":"lnbc50u1pnds3z8pp5t9xvnl3xqkggppj387kpal3jz9nen2h9qddl97lxchpffmwp9j0qhp5ytplu4c9grgl7qm29l94wvnywtun699harm6guxz5nry9nrdhmkscqzzsxqyz5vqsp57al6lud94sxvrkmc7xwe5z8dqekexqaajtqk8xlxk7x9ltq6e05s9qxpqysgq8803ahlp4xe76wet8xdqpxcmf3grw70jk5wcktnvn79jnq7cksmhgv7y7kewcgs4tcuy0y7uayy6r97m6yf8cadx6487jvegy8a9zscpyg9nl0"}}}
Sep 04 13:28:07 hostname ligess[719002]: {"level":30,"time":1725449287693,"pid":719002,"hostname":"hostname","reqId":"req-22","msg":"Invoice","invoice":{"complete":true,"millisatoshis":"5000000","network":{"bech32":"bc","pubKeyHash":0,"scriptHash":5,"validWitnessVersions":[0,1]},"payeeNodeKey":"035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226","paymentRequest":"lnbc50u1pnds3z8pp5t9xvnl3xqkggppj387kpal3jz9nen2h9qddl97lxchpffmwp9j0qhp5ytplu4c9grgl7qm29l94wvnywtun699harm6guxz5nry9nrdhmkscqzzsxqyz5vqsp57al6lud94sxvrkmc7xwe5z8dqekexqaajtqk8xlxk7x9ltq6e05s9qxpqysgq8803ahlp4xe76wet8xdqpxcmf3grw70jk5wcktnvn79jnq7cksmhgv7y7kewcgs4tcuy0y7uayy6r97m6yf8cadx6487jvegy8a9zscpyg9nl0","prefix":"lnbc50u","recoveryFlag":1,"satoshis":5000,"signature":"39df1edfe1a9b3ed3b2b399a009b1b4c503779f2b51d8b2e6c9f8b2983d8b4377433c4f5b2ec22155e384793dce909a197dbd1127c75a6d54fe9332821fa5143","tags":[{"tagName":"payment_hash","data":"594cc9fe2605908086513fac1efe32116799aae5035bf2fbe6c5c294edc12c9e"},{"tagName":"purpose_commit_hash","data":"22c3fe570540d1ff036a2fcb57326472f93d14b7e8f7a470c2a4c642cc6dbeed"},{"tagName":"min_final_cltv_expiry","data":80},{"tagName":"expire_time","data":86400},{"tagName":"payment_secret","data":"f77faff1a5ac0cc1db78f19d9a08ed066d9303bd92c1639be6b78c5fac1acbe9"},{"tagName":"feature_bits","data":{"word_length":6,"option_data_loss_protect":{"required":false,"supported":false},"initial_routing_sync":{"required":false,"supported":false},"option_upfront_shutdown_script":{"required":false,"supported":false},"gossip_queries":{"required":false,"supported":false},"var_onion_optin":{"required":true,"supported":false},"gossip_queries_ex":{"required":false,"supported":false},"option_static_remotekey":{"required":false,"supported":false},"payment_secret":{"required":true,"supported":false},"basic_mpp":{"required":false,"supported":true},"option_support_large_channel":{"required":false,"supported":false},"extra_bits":{"start_bit":20,"bits":[false,false,false,false,false,true,false,false,false,false],"has_required":false}}}],"timeExpireDate":1725535687,"timeExpireDateString":"2024-09-05T11:28:07.000Z","timestamp":1725449287,"timestampString":"2024-09-04T11:28:07.000Z","wordsTemp":"temp1pnds3z8pp5t9xvnl3xqkggppj387kpal3jz9nen2h9qddl97lxchpffmwp9j0qhp5ytplu4c9grgl7qm29l94wvnywtun699harm6guxz5nry9nrdhmkscqzzsxqyz5vqsp57al6lud94sxvrkmc7xwe5z8dqekexqaajtqk8xlxk7x9ltq6e05s9qxpqysgq8803ahlp4xe76wet8xdqpxcmf3grw70jk5wcktnvn79jnq7cksmhgv7y7kewcgs4tcuy0y7uayy6r97m6yf8cadx6487jvegy8a9zscpsajy9h"}}
Sep 04 13:28:07 hostname ligess[719002]: {"level":30,"time":1725449287693,"pid":719002,"hostname":"hostname","reqId":"req-22","msg":"Total","hour":0,"day":21}
Sep 04 13:28:08 hostname ligess[719002]: {"level":30,"time":1725449288115,"pid":719002,"hostname":"hostname","reqId":"req-22","msg":"Invoice paid","result":{"paymentPreimage":"40231a49b60e310e6f5bff6b890ab5978e406937e578cff76806f8c4d5bb6dfc","feesAmount":"2","feesAmountMsats":"2830"}}
Sep 04 13:29:07 hostname ligess[719002]: {"level":30,"time":1725449347657,"pid":719002,"hostname":"hostname","reqId":"req-22","msg":"Connection closed","code":1006,"reason":{"type":"Buffer","data":[]}}

The last log in the console is [zap invoice], not sure if there should be anything after that.

@SnowCait
Copy link
Owner

SnowCait commented Sep 4, 2024

The Zap dialog is closed when kind 23195 EVENT comes back from the relay.
I'm not sure why it cannot be received, I will check the code.

If received:

console.log('[NWC success]', packet);
resolve(packet.event);

@mutatrum
Copy link
Author

mutatrum commented Sep 5, 2024

Thank you for the investigation. I added some extra logging on my end and noticed the 23195 event wasn't actually sent back. I fixed that, but it still doesn't seem to arrive, I don't see a [NWC success] log in the console.

Logging from my end shows the event is now being sent, but I have to look into it to see if it's actually correct. It was missing a created_at field but adding that doesn't seem to fix it.

Sep 05 10:57:17 hostname ligess[811189]: {"level":30,"time":1725526637062,"pid":811189,"hostname":"hostname","reqId":"req-1","req":{"method":"GET","url":"/relay/","hostname":"relay.hodl.camp","remoteAddress":"127.0.0.1","remotePort":39310},"msg":"incoming request"}
Sep 05 10:57:17 hostname ligess[811189]: {"level":30,"time":1725526637065,"pid":811189,"hostname":"hostname","reqId":"req-1","msg":"Message sent","message":["AUTH","b6463d20d3b754261f99a6520412aff876d1b48d"]}
Sep 05 10:57:17 hostname ligess[811189]: {"level":30,"time":1725526637071,"pid":811189,"hostname":"hostname","reqId":"req-1","msg":"Message received","message":["EVENT",{"kind":23194,"created_at":1725526637,"content":"yAt8AhGjFoi3m9rL2EqWKGFXxsM94ILXWQ5pDTDXXUqgmajEF3YkaC/eUGZH9V+BqLo3FiD4BAYFNkNZ2W1/sjR5sgFOUgJQXotlmR2vbDAZJGjHAFLYwancjPTNyMkwgsmIyOYWoeNP5UoJrDoqPeE8X/ZgwW/O2YTfOos8PTLe5L6tGPM4ElNIoQLGP1QA2DuFccXsjkO6UrNBV20tnWIprtSU0CxqRr0HMc9+yNu+cJflLpTJJlm6X/ZdQRhupWd5g9qm8zhMLhh99VE1B+uXt+pE3ROauPFHeB2IY44K9DWfNJkH3w+/B0P3ODqZAFX8/lFhCJVbe0yavVgAnFJYV0+T4Xq0Kfje92ASFresJtXho29oSy8AGg0kcLiT0HoHQ1yxL+pEoa00PR+k3YA6azZqK1DbsbEYf2DlO2xLvOD0qzT4AkBsGxwmtlBM1lFgWVRT6DD1uqT7rjRFxQzCAdqxQqEervvRKvO8rjU=?iv=1bUUXjRd21tfYG4ks5oMFg==","tags":[["p","9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b"]],"pubkey":"9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b","id":"9c30f03438d8592917d8696d37072ecdcd1e4d939ff123cce00d92cfb93f6684","sig":"cd3f616f161028ea3ad1fb425f315c048caa416778717e12e0e49cd3c2c1553f1b0b837b6d0e7bd4e4469bc925022614f07bb99afbc1fc0c8d48bc0ec4cf8da7"}]}
Sep 05 10:57:17 hostname ligess[811189]: {"level":30,"time":1725526637081,"pid":811189,"hostname":"hostname","reqId":"req-1","msg":"Message received","message":["AUTH",{"kind":22242,"content":"","tags":[["relay","wss://relay.hodl.camp"],["challenge","b6463d20d3b754261f99a6520412aff876d1b48d"]],"pubkey":"9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b","created_at":1725526637,"id":"c0dfebf0e059438c6f300192e23922b5360bcdf29a70a0437476ee9cf5ec44d5","sig":"37556af415bf878c281f11fce7c301d65fabd11d7cb4611eea9f9d63d92ec81878bb0843e1d6eb5b1d89d09001b3095f0903ec97489bd54adfa198a574c59607"}]}
Sep 05 10:57:17 hostname ligess[811189]: {"level":30,"time":1725526637081,"pid":811189,"hostname":"hostname","reqId":"req-1","msg":"Message received","message":["REQ","659575:0",{"kinds":[23195],"authors":["9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b"],"#e":["9c30f03438d8592917d8696d37072ecdcd1e4d939ff123cce00d92cfb93f6684"]}]}
Sep 05 10:57:17 hostname ligess[811189]: {"level":30,"time":1725526637081,"pid":811189,"hostname":"hostname","reqId":"req-1","msg":"Message sent","message":["EOSE","659575:0"]}
Sep 05 10:57:17 hostname ligess[811189]: {"level":30,"time":1725526637091,"pid":811189,"hostname":"hostname","reqId":"req-1","msg":"Connection is authenticated: npub1n5x0cyqxhaahzt9mnnx8xqqqehemrl8ky2j5r7kl0fpj59sfkuasxasqwz"}
Sep 05 10:57:17 hostname ligess[811189]: {"level":30,"time":1725526637099,"pid":811189,"hostname":"hostname","reqId":"req-1","msg":"Pay request","content":{"method":"pay_invoice","params":{"invoice":"lnbc210n1pndjunvpp52gy42m2xhuvrh52p2rq8jp36dm0hwedza6phkgd4vnntmlht66kqhp5zw06edggkks0l9lvkn4lksaw68nv4ww743cm3a2x5pmlh2xxq8mqcqzzsxqyz5vqsp5peudds3wenh8jrqpnym29eys5fdscpyl6ga358tkvyfccrgk88vq9qxpqysgqj4p2krjj8hjvm745ckc72z5w0dpjxxeexghnjfj65taq2w0p0kjzzxk2deh87qqgfvv6xtm325uw2nuv94yd84ms9j9fvaegckvpqjqpawu0pq"}}}
Sep 05 10:57:17 hostname ligess[811189]: {"level":30,"time":1725526637103,"pid":811189,"hostname":"hostname","reqId":"req-1","msg":"Invoice","invoice":{"complete":true,"millisatoshis":"21000","network":{"bech32":"bc","pubKeyHash":0,"scriptHash":5,"validWitnessVersions":[0,1]},"payeeNodeKey":"035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226","paymentRequest":"lnbc210n1pndjunvpp52gy42m2xhuvrh52p2rq8jp36dm0hwedza6phkgd4vnntmlht66kqhp5zw06edggkks0l9lvkn4lksaw68nv4ww743cm3a2x5pmlh2xxq8mqcqzzsxqyz5vqsp5peudds3wenh8jrqpnym29eys5fdscpyl6ga358tkvyfccrgk88vq9qxpqysgqj4p2krjj8hjvm745ckc72z5w0dpjxxeexghnjfj65taq2w0p0kjzzxk2deh87qqgfvv6xtm325uw2nuv94yd84ms9j9fvaegckvpqjqpawu0pq","prefix":"lnbc210n","recoveryFlag":1,"satoshis":21,"signature":"9542ab0e523de4cdfab4c5b1e50a8e7b43231b39322f39265aa2fa0539e17da4211aca6e6e7f00084b19a32f715538e54f8c2d48d3d7702c8a967728c5981048","tags":[{"tagName":"payment_hash","data":"5209556d46bf183bd14150c079063a6edf7765a2ee837b21b564e6bdfeebd6ac"},{"tagName":"purpose_commit_hash","data":"139facb508b5a0ff97ecb4ebfb43aed1e6cab9deac71b8f546a077fba8c601f6"},{"tagName":"min_final_cltv_expiry","data":80},{"tagName":"expire_time","data":86400},{"tagName":"payment_secret","data":"0e78d6c22eccee790c019936a2e490a25b0c049fd23b1a1d7661138c0d1639d8"},{"tagName":"feature_bits","data":{"word_length":6,"option_data_loss_protect":{"required":false,"supported":false},"initial_routing_sync":{"required":false,"supported":false},"option_upfront_shutdown_script":{"required":false,"supported":false},"gossip_queries":{"required":false,"supported":false},"var_onion_optin":{"required":true,"supported":false},"gossip_queries_ex":{"required":false,"supported":false},"option_static_remotekey":{"required":false,"supported":false},"payment_secret":{"required":true,"supported":false},"basic_mpp":{"required":false,"supported":true},"option_support_large_channel":{"required":false,"supported":false},"extra_bits":{"start_bit":20,"bits":[false,false,false,false,false,true,false,false,false,false],"has_required":false}}}],"timeExpireDate":1725613036,"timeExpireDateString":"2024-09-06T08:57:16.000Z","timestamp":1725526636,"timestampString":"2024-09-05T08:57:16.000Z","wordsTemp":"temp1pndjunvpp52gy42m2xhuvrh52p2rq8jp36dm0hwedza6phkgd4vnntmlht66kqhp5zw06edggkks0l9lvkn4lksaw68nv4ww743cm3a2x5pmlh2xxq8mqcqzzsxqyz5vqsp5peudds3wenh8jrqpnym29eys5fdscpyl6ga358tkvyfccrgk88vq9qxpqysgqj4p2krjj8hjvm745ckc72z5w0dpjxxeexghnjfj65taq2w0p0kjzzxk2deh87qqgfvv6xtm325uw2nuv94yd84ms9j9fvaegckvpqjqpmjmzm2"}}
Sep 05 10:57:17 hostname ligess[811189]: {"level":30,"time":1725526637103,"pid":811189,"hostname":"hostname","reqId":"req-1","msg":"Total","hour":105,"day":15126}
Sep 05 10:57:17 hostname ligess[811189]: {"level":30,"time":1725526637425,"pid":811189,"hostname":"hostname","reqId":"req-1","msg":"Invoice paid","result":{"paymentPreimage":"7e03219ae0941d2d879e390123a1599705a551d4568732bbfd6c64293ea4d6e2","feesAmount":"0","feesAmountMsats":"0"}}
Sep 05 10:57:17 hostname ligess[811189]: {"level":30,"time":1725526637435,"pid":811189,"hostname":"hostname","reqId":"req-1","msg":"Message sent","message":["EVENT",{"kind":23195,"pubkey":"9d0cfc1006bf7b712cbb9ccc730000cdf3b1fcf622a541fadf7a432a1609b73b","created_at":1725526637,"tags":[["e","9c30f03438d8592917d8696d37072ecdcd1e4d939ff123cce00d92cfb93f6684"]],"content":"7e03219ae0941d2d879e390123a1599705a551d4568732bbfd6c64293ea4d6e2","id":"253f3f51f4fdd3bae7768677c6ce5ca5c79738bb40ca51322dc0291bb6177c2c","sig":"05276b3be9f12b412e825dfa7eaa4e4414a6f36fcf96df0369bb66785baf36ff13f29cebf83c5febce4e45ff1df2b00c1486b9cc82db7d180b0aaa761e06d29f"}]}

What I noticed when testing a zap with Amethyst is that it also doesn't seem to close the zap process, I guess it's also waiting for this event. So the remaining issue is probably on my end.

@SnowCait
Copy link
Owner

SnowCait commented Sep 5, 2024

Thanks. The message seems not to contain subscription id 659575:0.

@mutatrum
Copy link
Author

mutatrum commented Sep 5, 2024

Just saw that, added that. Getting closer:
image
Task failed succesfully? 😆

I'll check the event more, I think it should be encrypted and I'm not sure that's done.

@mutatrum
Copy link
Author

mutatrum commented Sep 5, 2024

Ah, this is all new stuff, added to NIP-47 after I wrote ligess. I guess Amethyst doesn't care or has fallback mechanism to the old style, but nostter is way more strict, which is good.

I think this issue can be closed now, I hope you don't mind if I continue zapping you for testing 😆 Thank you for your patience and once again thanks for your work on this awesome client!

@mutatrum
Copy link
Author

mutatrum commented Sep 5, 2024

One more comment: I think I fixed the response. If I zap a note, it closes the dialog so that's good.

image

It looks like it's decoded properly, with the correct result object containing the preimage. 👍

The only thing that I don't see is that the zap notification is shown under the note (in thread view). It does shows up after a page reload.

@SnowCait
Copy link
Owner

SnowCait commented Sep 5, 2024

Congratulations🎉
I will think about how it will be shown after the Zap. (Failure UI too. #1223)

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

No branches or pull requests

2 participants