cameri / nostream

A Nostr Relay written in TypeScript
MIT License
713 stars 181 forks source link

feat: implement opennode payments processor #315

Closed cameri closed 1 year ago

cameri commented 1 year ago

Description

  1. Implement OpenNode payments processor
  2. Refactor request handlers and controllers to keep code DRY

Related Issue

https://github.com/Cameri/nostream/issues/314

Motivation and Context

  1. Give relay operators more choice when it comes to payments processors

How Has This Been Tested?

  1. Manually paying invoices

Screenshots (if appropriate):

Types of changes

Checklist:

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 5058928166


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/factories/controllers/lnbits-callback-controller-factory.ts 5 6 83.33%
src/factories/controllers/opennode-callback-controller-factory.ts 3 4 75.0%
src/factories/controllers/zebedee-callback-controller-factory.ts 3 4 75.0%
src/factories/payments-processor-factory.ts 5 6 83.33%
src/utils/transform.ts 4 5 80.0%
src/factories/controllers/get-invoice-status-controller-factory.ts 4 7 57.14%
src/handlers/request-handlers/with-controller-request-handler.ts 1 4 25.0%
src/factories/controllers/post-invoice-controller-factory.ts 7 11 63.64%
src/factories/payments-processors/lnurl-payments-processor-factory.ts 5 10 50.0%
src/factories/payments-processors/nodeless-payments-processor-factory.ts 6 13 46.15%
<!-- Total: 97 258 37.6% -->
Files with Coverage Reduction New Missed Lines %
src/controllers/callbacks/nodeless-callback-controller.ts 1 15.69%
src/controllers/callbacks/zebedee-callback-controller.ts 1 13.46%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 5027620282: -0.003%
Covered Lines: 1282
Relevant Lines: 2292

💛 - Coveralls
sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

29.5% 29.5% Coverage
5.6% 5.6% Duplication

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.25.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: