feat: add Request Payment UI to Payments page - #37
Merged
sirdeggen merged 22 commits intoApr 9, 2026
Merged
Conversation
Temporarily using npm link to local clone of message-box-client with payment request methods. Will switch to published version once bsv-blockchain/message-box-client#38 is merged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…request settings Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add on/off toggle for whitelist with visual ON/OFF chip indicator - Add identity search (useIdentitySearch) to whitelist management - Show full whitelisted identity keys with delete button - Direct key paste fallback when identity not found in search - Change tab variant from scrollable to fullWidth so all labels visible - Whitelist enabled state persisted in localStorage
… server permissions
The dependency was accidentally removed during npm link setup. Restored with ^2.0.6 (current registry version). This PR requires bsv-blockchain/message-box-client#38 to be merged and a new version published before the build will pass.
Add changelog entry for Request Payment feature: - Request/fulfill/decline payment requests - Outgoing request tracker with live status - Identity whitelist with toggle - Min/max amount limits - 4-tab Payments page layout
Fulfilled requests now show a Receive button in the outgoing tracker to accept/internalize the payment directly, instead of requiring the user to go to the Pending Payments tab. Displays the fulfiller's note in a quote block and shows the paid amount prominently.
All localStorage keys for the request payment feature are now suffixed with the active profile's identity key. Prevents cross-account data overwrites when users switch between multiple identities in the same wallet. Affected keys: payReq_outgoing, payReq_whitelist, payReq_minAmount, payReq_maxAmount, payReq_whitelistEnabled
…requests Previously polling only started after 15 seconds and only checked for pending requests. Now polls immediately when the component mounts with actionable requests, and also polls for paid requests that still need their incomingPayment reference fetched for the Receive button.
Previously the component loaded from a fallback key when activeProfile was undefined on mount, then overwrote the identity-scoped key with empty data when the profile resolved. Now storageKey is null until the identity is available, and load/save effects are skipped until then.
…mpletes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n mutation Replace the useEffect-based save (which raced with the load effect) with an updateOutgoing() helper that writes to localStorage synchronously inside the setState updater. The load effect only reads; all mutations go through updateOutgoing which persists immediately. This guarantees the initial empty state never overwrites persisted data.
The logout() function calls localStorage.clear() which wiped all payment request data (outgoing requests, whitelist, amount limits). Now saves and restores all keys prefixed with payReq_ around the clear, so request data persists across logout/login cycles.
- RequestPaymentForm: capture requestProof from requestPayment() return, store it in OutgoingRequest, pass it to cancelPaymentRequest() - IncomingRequestList: remove amount override from fulfillPaymentRequest() (API no longer supports it), remove "Amount to Pay" text field and unused payAmounts state Matches API changes in bsv-blockchain/message-box-client#38: - fulfillPaymentRequest no longer accepts amount override - cancelPaymentRequest now requires requestProof parameter - requestPayment now returns { requestId, requestProof } Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Dependencies
New Files
src/lib/pages/Dashboard/Payments/RequestPaymentForm.tsx— request form + outgoing trackersrc/lib/pages/Dashboard/Payments/IncomingRequestList.tsx— request cards + settings panelModified Files
src/lib/pages/Dashboard/Payments/index.tsx— tab navigation and new component integrationSecurity
payment_requestsbox blocks all senders until explicitly whitelistedTest plan
npm run build:renderer)🤖 Generated with Claude Code