supertestnet / superstore

A simple bitcoin webstore with whisper addresses for enhanced privacy
https://supertestnet.github.io/superstore/
Creative Commons Zero v1.0 Universal
97 stars 27 forks source link

Lost connection to relays popup #8

Closed thebullishbitcoiner closed 1 year ago

thebullishbitcoiner commented 1 year ago

The attached popup keeps popping up. I’ve tried refreshing the browser and using the website on a fresh install of Firefox. Screenshot 2023-07-14 234136

time-out commented 1 year ago

Yes, it happens all the time.

supertestnet commented 1 year ago

I think it is because one of the relays I hard coded, wss://relay.wellorder.net, is no longer functional. You can adjust your relays by these steps:

I have also upgraded the site to replace relay.wellorder.net with relay.damus.io as a default

thebullishbitcoiner commented 1 year ago

That works! Thanks! 🤙🏼

GALLAY commented 1 year ago

Does not work for me. Popup appears regularly. wss lost

thebullishbitcoiner commented 1 year ago

Hm I noticed that sometimes too, even after editing the relays. I wonder if it's a coincidence that a relay doesn't respond when polled. So theoretically, even if a relay is "good", it could fail the connection check at any time for whatever reason. Just my guess. 😄

supertestnet commented 1 year ago

It looks like the new culprit is wss://nostr.oxtr.dev/ -- they are no longer reliable. I have replaced them as a default with wss://nostr.zenon.info. I also updated the alert message, which now does several things:

(1) it tells you which relay is giving you trouble (2) it tries to detect if you are the store admin or just a customer (3) if it thinks you are just a customer it tells you to please ask the store admin for assistance if the connection issue persists (4) if it thinks you are the store admin it tells you how to update your relays and directs you to this github if you need further assistance

I hope these efforts remedy the issue.

supertestnet commented 1 year ago

I modified the relay logic in the following ways:

For these reasons I do not think connection errors are likely to be displayed anymore except when a relay really is down. So I think this problem is finally solved and am closing this issue.