Skip to content
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

refactor: move fee calculation logic to execution package #1195

Merged
merged 5 commits into from
Apr 5, 2024

Conversation

b00f
Copy link
Collaborator

@b00f b00f commented Apr 4, 2024

Description

This PR includes changes related to fee calculation:

  1. Fixed an issue with calculating unbonding fees, which should be set to zero.
  2. No longer returns an error on zero amounts.
  3. Moved the fee calculation logic to the execution package.

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

Merging #1195 (c3d8249) into main (1351669) will decrease coverage by 0.05%.
The diff coverage is 80.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1195      +/-   ##
==========================================
- Coverage   81.48%   81.43%   -0.05%     
==========================================
  Files         179      179              
  Lines        9532     9528       -4     
==========================================
- Hits         7767     7759       -8     
- Misses       1381     1387       +6     
+ Partials      384      382       -2     

@kehiy kehiy changed the title fix: unbond fee should be zero test(gRPC): unbond fee should be zero Apr 4, 2024
@kehiy kehiy changed the title test(gRPC): unbond fee should be zero test(gRPC): unbond fee must be zero Apr 4, 2024
@b00f b00f marked this pull request as draft April 4, 2024 14:51
@b00f b00f marked this pull request as ready for review April 4, 2024 16:56
@b00f b00f changed the title test(gRPC): unbond fee must be zero refactor: move fee calculation logic to execution package Apr 5, 2024
amount amount.Amount
fee amount.Amount
expectedFee amount.Amount
expectedErr bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can change it to: expectErr

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks

@ambersun1234 ambersun1234 merged commit a3e7045 into pactus-project:main Apr 5, 2024
12 checks passed
@b00f b00f deleted the fix-unbond-fee branch April 8, 2024 14:21
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