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(bg/OpenPayments): extract OutgoingPaymentGrantService #775

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

DarianM
Copy link
Member

@DarianM DarianM commented Dec 16, 2024

Closes #713

Changes proposed in this pull request

  • related grant and acesstoken functionality moved to OutgoingPaymentGrantService
  • provides a service for managing outgoing payment grants, including creating, canceling, and rotating grants, as well as switching between different grant types.
  • move connectWallet, addFunds, updateBudget, disconnectWallet and related to new walletService
  • move createOutgoingPayment and probeDebitAmount to paymentSession

@DarianM DarianM linked an issue Dec 16, 2024 that may be closed by this pull request
@github-actions github-actions bot added area: background Improvements or additions to extension background script area: shared Changes to shared libraries and utilities labels Dec 16, 2024
Copy link
Contributor

github-actions bot commented Dec 16, 2024

Extension builds preview

Name Link
Latest commit df898e8
Latest job logs Run #12437018103
BadgeDownload
BadgeDownload

@github-actions github-actions bot added the area: tests Improvements or additions to tests label Dec 16, 2024
@DarianM DarianM marked this pull request as ready for review December 16, 2024 07:54
@sidvishnoi sidvishnoi changed the title chore: Simplify OpenPaymentsService refactor(background): simplify OpenPaymentsService, extract OutgoingPaymentGrantService Dec 16, 2024
@sidvishnoi sidvishnoi changed the title refactor(background): simplify OpenPaymentsService, extract OutgoingPaymentGrantService refactor(bg/OpenPaymentsService): move functionality to OutgoingPaymentGrantService Dec 16, 2024
@sidvishnoi sidvishnoi changed the title refactor(bg/OpenPaymentsService): move functionality to OutgoingPaymentGrantService refactor(bg/OpenPayments): move functionality to OutgoingPaymentGrantService Dec 16, 2024
@sidvishnoi sidvishnoi changed the title refactor(bg/OpenPayments): move functionality to OutgoingPaymentGrantService refactor(bg/OpenPayments): extract OutgoingPaymentGrantService Dec 16, 2024
@DarianM DarianM marked this pull request as draft December 16, 2024 08:33
@github-actions github-actions bot added area: popup Improvements or additions to extension popup area: pages Changes to any of extension's pages and removed area: tests Improvements or additions to tests area: shared Changes to shared libraries and utilities labels Dec 16, 2024
Copy link
Member

@sidvishnoi sidvishnoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits in first round of review.
Overall:

  • Should move connectWallet and more outgoing-payment grant related things into new service.
  • Make background communicate directly with new service, instead of going through OpenPaymentsService

src/background/container.ts Outdated Show resolved Hide resolved
src/pages/popup/index.tsx Outdated Show resolved Hide resolved
src/background/services/outgoingPaymentGrant.ts Outdated Show resolved Hide resolved
src/background/services/outgoingPaymentGrant.ts Outdated Show resolved Hide resolved
src/background/services/outgoingPaymentGrant.ts Outdated Show resolved Hide resolved
@sidvishnoi sidvishnoi removed the request for review from raducristianpopa December 16, 2024 12:01
@github-actions github-actions bot removed area: popup Improvements or additions to extension popup area: pages Changes to any of extension's pages labels Dec 20, 2024
@DarianM DarianM marked this pull request as ready for review December 20, 2024 19:07
@DarianM DarianM requested a review from sidvishnoi December 20, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: background Improvements or additions to extension background script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: simplify OpenPaymentsService
2 participants