Skip to content

Implement credits payment method #830

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

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

Conversation

nesitor
Copy link
Member

@nesitor nesitor commented Aug 8, 2025

Feature: Implement credits payment method monitoring, same behaviour as PAYG but with credits.

Related ClickUp, GitHub or Jira tickets : ALEPH-615

Self proofreading checklist

  • The new code clear, easy to read and well commented.
  • New code does not duplicate the functions of builtin or popular libraries.
  • An LLM was used to review the new code and look for simplifications.
  • New classes and functions contain docstrings explaining what they provide.
  • All new code is covered by relevant tests.
  • Documentation has been updated regarding these changes.
  • Dependencies update in the project.toml have been mirrored in the Debian package build script packaging/Makefile

Changes

Added credit payment method on balance monitoring task. Also added needed methods to query the API for credit balance based on address.

How to test

Create an intance using credits payment method and remove the credits, the instance should be stopped.

@nesitor nesitor requested a review from olethanh August 8, 2025 08:56
@nesitor nesitor self-assigned this Aug 8, 2025
Copy link

codecov bot commented Aug 8, 2025

Codecov Report

❌ Patch coverage is 34.54545% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.47%. Comparing base (05a9072) to head (3e3351f).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/aleph/vm/orchestrator/tasks.py 21.73% 16 Missing and 2 partials ⚠️
src/aleph/vm/orchestrator/payment.py 20.00% 16 Missing ⚠️
src/aleph/vm/orchestrator/views/__init__.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #830      +/-   ##
==========================================
- Coverage   64.61%   64.47%   -0.14%     
==========================================
  Files          87       87              
  Lines        8048     8063      +15     
  Branches      722      727       +5     
==========================================
- Hits         5200     5199       -1     
- Misses       2621     2637      +16     
  Partials      227      227              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant