web-monetization-extension
web-monetization-extension copied to clipboard
refactor(background/paymentSession): extract `createOutgoingPayment`
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.
Extension builds preview
| Name | Link |
|---|---|
| Latest commit | f7d9fdde341cba4a6c9a500591eb869360f1bfc3 |
| Latest job logs | Run #9125395907 |
| Download | |
| Download |
Closing in favour of https://github.com/interledger/web-monetization-extension/pull/305