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

check add and sub operation for owned fraction #229

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

cymqqqq
Copy link
Contributor

@cymqqqq cymqqqq commented Jun 26, 2024

Background:
In the rgb21 contract, we have error fractionOverflow "The amount of token fractions in outputs exceeds 1", so I think maybe we should have a check add/sub-operation to check if or not the owned fraction is overflow(or the other fraction checks for add/sub-operation), also we can make a change for the allocation. It's similar to the rgb20 amount.

Description:

add check_add, check_sub, check_addassign, check_subassign, and other methods for the Ownedfraction.

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 75.86207% with 21 lines in your changes missing coverage. Please review.

Project coverage is 17.6%. Comparing base (1c5b910) to head (7f637c6).
Report is 4 commits behind head on master.

Files Patch % Lines
invoice/src/data.rs 75.9% 21 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #229     +/-   ##
========================================
+ Coverage    17.0%   17.6%   +0.5%     
========================================
  Files          37      37             
  Lines        7379    7535    +156     
========================================
+ Hits         1257    1323     +66     
- Misses       6122    6212     +90     
Flag Coverage Δ
rust 17.6% <75.9%> (+0.5%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@cryptoquick cryptoquick left a comment

Choose a reason for hiding this comment

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

Love the tests... It's also funny to see codecov flag tests as untested

Copy link
Member

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

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

ACK 7f637c6

@dr-orlovsky dr-orlovsky added the enhancement New feature or request label Jun 27, 2024
@dr-orlovsky dr-orlovsky added this to the v0.11.0 milestone Jun 27, 2024
@dr-orlovsky dr-orlovsky merged commit 7dc988c into RGB-WG:master Jun 27, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants