web-monetization-extension icon indicating copy to clipboard operation
web-monetization-extension copied to clipboard

refactor(background/paymentSession): extract `createOutgoingPayment`

Open sidvishnoi opened this issue 1 year ago • 1 comments

Context

Part of going through the code 😃

Changes proposed in this pull request

Extract a private function createOutgoingPayment, and re-use it in PaymentSession.start() and PaymentSession.pay(amount). Keeps sendMonetizationEvent logic (which earlier belonged to finally block) out of createOutgoingPayment, keeping it responsibility of caller.

Best review this PR with whitespace ignored.

sidvishnoi avatar May 15 '24 08:05 sidvishnoi

Extension builds preview

Name Link
Latest commit f7d9fdde341cba4a6c9a500591eb869360f1bfc3
Latest job logs Run #9125395907
BadgeDownload
BadgeDownload

raducristianpopa avatar May 15 '24 08:05 raducristianpopa

Closing in favour of https://github.com/interledger/web-monetization-extension/pull/305

sidvishnoi avatar Jun 05 '24 09:06 sidvishnoi