Skip to content

Fix: Estimated cost based on TX and not hardcoded value #359

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 6 commits into
base: master
Choose a base branch
from

Conversation

1yam
Copy link
Member

@1yam 1yam commented Apr 2, 2025

This PR mostly simplify the logic on instance delete using error hadnling change in PR

Related ClickUp, GitHub or Jira tickets : ALEPH-496

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.

Changes

This pull request includes updates to dependencies and error handling improvements in the delete function. The most important changes are listed below:

Dependency Updates:

  • Updated the aleph-sdk-python dependency to a specific branch 1yam-fix-estimated-gas in pyproject.toml. (This need to be revert since it depends on it)

Error Handling Improvements:

  • Removed a redundant safety check for account transactions and added specific error handling for InsufficientFundsError in the delete function in src/aleph_client/commands/instance/__init__.py.

How to test

Explain how to test your PR.
This PR can be tested by using empty wallet with not enough gas / aleph otken

Notes

No change is made on instance create for UX reason we keep the pre check early.

@1yam 1yam force-pushed the 1yam-fix-gas-estimations branch from 937bb7c to 3548b53 Compare April 29, 2025 13:07
Copy link

codecov bot commented Apr 29, 2025

Codecov Report

Attention: Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.

Project coverage is 61.20%. Comparing base (671ea0e) to head (3548b53).

Files with missing lines Patch % Lines
src/aleph_client/commands/instance/__init__.py 28.57% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #359      +/-   ##
==========================================
- Coverage   61.32%   61.20%   -0.12%     
==========================================
  Files          18       18              
  Lines        3206     3207       +1     
  Branches      452      452              
==========================================
- Hits         1966     1963       -3     
- Misses       1001     1004       +3     
- Partials      239      240       +1     

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

@aleph-im aleph-im deleted a comment from github-actions bot May 20, 2025
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.

2 participants