-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
add max supply global state for inflation asset #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Max supply can be absent - depending on specific RGB20 interface used. For instance, it is absent for non-inflatible assets. Thus, this method should default to the issued supply value if the max supply is not found
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5 +/- ##
========================================
Coverage ? 39.9%
========================================
Files ? 17
Lines ? 1887
Branches ? 0
========================================
Hits ? 753
Misses ? 1134
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one last small thing and I can merge this
src/rgb20/wrapper.rs
Outdated
.unwrap_or( | ||
self.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this not to do an unnecessary secondary call to global
if we have maxSupply
in place
.unwrap_or( | |
self.0 | |
.unwrap_or_else(|| self.0 |
Description:
In rgb20 Inflation asset iface, there are
issuedSupply
andmaxSupply
in the global state, here I try to add themaxSupply
method for the rgb-interface.