Skip to content

Conversation

@droplister
Copy link
Member

Summary

  • Centralizes provider request detection into the Composer component via useProviderRequest hook
  • Adds auto-compose for provider requests - skips the form step and goes straight to review
  • Removes denormalization layer - provider data is now passed directly in API format (satoshis)
  • Uses ApprovalService proxy instead of direct safeSendMessage calls for cleaner approval handling
  • Adds auto-navigation for compose requests on index page
  • Significant code reduction: -217 lines net across 19 files

Test plan

  • Test manual send/order compose flows still work normally
  • Test provider request from dApp triggers auto-compose and shows review screen
  • Test approval/rejection flows for connection requests
  • Test disconnect functionality in connected sites settings

- Move provider request detection into Composer component using useProviderRequest hook
- Add auto-compose for provider requests (skip form, go straight to review)
- Remove denormalization - provider data passed directly in API format
- Use ApprovalService proxy instead of direct safeSendMessage calls
- Add auto-navigation for compose requests on index page
- Add hideBackButton prop to ReviewScreen for provider requests
- Remove resolve-provider-request handler from background script
- Simplify ProviderService and ConnectionService (-213 lines)
@droplister droplister force-pushed the refactor/provider-request-flow branch from e3015d9 to 3af3be7 Compare January 6, 2026 07:33
- Update @playwright/test to 1.57.0 (fixes SSL cert verification)
- Update happy-dom to 20.0.11 (fixes VM context escape RCE)
- npm audit fix for glob, js-yaml, node-forge, vite vulnerabilities
- Fix providerService.test.ts: Update regex pattern to match actual
  compose operation ID format (compose-compose-send-xxx)
- Fix ApprovalService.test.ts: Update badge color assertion to match
  implementation (#3B82F6 instead of #EF4444)
- Fix ConnectionService.test.ts: Add mock for getApprovalService and
  emit method on eventEmitterService to avoid chrome.runtime errors
Add mock for webext-bridge/background before importing Composer
component to prevent Browser.runtime.onConnect.addListener error.
Add NODE_OPTIONS=--max_old_space_size=4096 to prevent out-of-memory
crashes when running the full test suite in CI.
The component imports from @/utils/blockchain/counterparty/api
but the test was mocking @/utils/blockchain/counterparty.
The form component imports from @/utils/blockchain/counterparty/api
and @/utils/blockchain/counterparty/memo, not the base path.
Use || true to capture vitest exit even if process crashes from OOM,
then check test-results.json for actual pass/fail status. This handles
the case where all tests pass but Node.js runs out of memory during
teardown/reporting.
@droplister droplister merged commit a7c30c9 into main Jan 6, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants