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

Refactor default payment method setting #803

Merged
merged 2 commits into from
Feb 9, 2024

Commits on Feb 9, 2024

  1. Refactor setting of default providers

    * fixed warning about component update while rendering another component
    * individual providers no longer need to know if they are the default or not
    * default setting is now handled by WebLNContext -- the same context that returns the provider. this makes a lot more sense and is a lot easier to read
    * default payment checkbox is now also disabled if there is only one enabled provider or if it is the default provider
    ekzyis committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    e2d6667 View commit details
    Browse the repository at this point in the history
  2. Fix order lost on page reload

    On page reload, the providers were synced in the order they were loaded.
    
    This means that the default payment provider setting was lost.
    
    Fixed this by syncing order to local storage and on page reload, only syncing providers when they were initialized (else the order would have been lost again).
    ekzyis committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    040cb0b View commit details
    Browse the repository at this point in the history