Skip to content

Conversation

@olethanh
Copy link
Collaborator

fetch_balance_of_address and fetch_credit_balance_of_address always returned 0, which prevented allocating a new instance.

Analysis:
This was a regression introduced in #834
Function checked the balance and credit_balance field presence using hasattr() however they are dictionary fields, not properties on the object.

Solution:
Rewrite using get()

@olethanh olethanh force-pushed the ol-fix-balance-check branch from 8229285 to 43dff84 Compare September 26, 2025 10:05
@olethanh olethanh force-pushed the ol-fix-balance-check branch from 43dff84 to a9cd60c Compare September 26, 2025 10:14
@olethanh olethanh force-pushed the ol-fix-balance-check branch from d7d233f to e2ecda0 Compare September 29, 2025 09:00
@nesitor nesitor force-pushed the ol-fix-balance-check branch from e2ecda0 to af47a2d Compare October 8, 2025 12:47
@codecov
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

❌ Patch coverage is 76.08696% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.84%. Comparing base (c79a8cc) to head (af47a2d).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
src/aleph/vm/orchestrator/payment.py 26.66% 9 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #835      +/-   ##
==========================================
- Coverage   64.84%   64.84%   -0.01%     
==========================================
  Files          87       88       +1     
  Lines        8095     8160      +65     
  Branches      723      734      +11     
==========================================
+ Hits         5249     5291      +42     
- Misses       2620     2640      +20     
- Partials      226      229       +3     

☔ 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.

@nesitor nesitor merged commit 5e4f6fa into main Oct 8, 2025
21 of 22 checks passed
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.

3 participants