interledger / web-monetization-extension

An open-source browser extension that enables Web Monetization.
Apache License 2.0
72 stars 5 forks source link

fix(ConnectWalletForm): preserve errors on popup reopen #638

Closed sidvishnoi closed 1 month ago

sidvishnoi commented 1 month ago

Context

Part of https://github.com/interledger/web-monetization-extension/issues/613

Changes proposed in this pull request

Screencast from 02-10-24 05:45:59 PM IST.webm

github-actions[bot] commented 1 month ago

Extension builds preview

Name Link
Latest commit a356a05ca92614178cfcfb239feb87ca128028c2
Latest job logs Run #11146038174
BadgeDownload
BadgeDownload
sidvishnoi commented 1 month ago

Yes, so user knows what went wrong. For example, we open new tab, popup closes:

We need that context (even if we don't show error message). These will be cleared when user successfully connects (or resets when user tries to connect again, to be replaced with newer error message); or when browser is closed.

Example when we won't show redirect page with error (but popup was closed on tab open): image

sidvishnoi commented 1 month ago

TODO: reset all error and state when wallet address is changed (or add a "reset" button somewhere in error message?)