Saved payment methods management UI#17
Merged
Merged
Conversation
Replaces the single NWC connection field on the account settings page with a payment-methods manager backed by the new /api/v1/payment-methods API: - List saved methods (Lightning wallet / card with brand, last4, expiry) - Set default, enable/disable, and remove methods - Add a Nostr Wallet Connect wallet - Flag expired cards The NWC payment option in the VM/subscription payment flows now shows based on whether the user has a saved NWC method (the account nwc_connection_string field was removed from the API). Companion to LNVPS/api#160.
Show and edit an optional label per saved method (rename inline, and set a label when adding an NWC wallet) so users can distinguish multiple methods. Refs LNVPS/api#85
Contributor
Author
|
Added UI to set/edit an optional name per saved method (inline rename + label when adding an NWC wallet). Backend: LNVPS/api#160. Refs LNVPS/api#85. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to LNVPS/api#160.
Summary
Replaces the single NWC connection field on the account settings page with a payment-methods manager backed by the new
/api/v1/payment-methodsAPI. Users can now keep multiple methods (Lightning wallet via NWC and/or a saved Revolut card) and choose which is the default used for automatic renewals.Changes
components/payment-methods.tsx(new): lists saved methods (card brand •••• last4 + expiry, or "Lightning Wallet (NWC)"), with set default, enable/disable, remove, and add NWC wallet. Flags expired cards.account-settings.tsx: the "Automatic Renewal" NWC input is replaced by the new manager.api.ts: addsSavedPaymentMethod+listPaymentMethods/addNwcPaymentMethod/updatePaymentMethod/deletePaymentMethod; removesnwc_connection_stringfromAccountDetail.Notes
Revolut cards are still saved automatically during checkout (#16); this PR adds management of the resulting methods. Requires api#160 (the
/api/v1/payment-methodsendpoints + account field removal).Typecheck (
tsc --noEmit) and eslint pass.