-
Notifications
You must be signed in to change notification settings - Fork 648
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 asset_sufficient
getter for fungibles
#1768
Changes from 8 commits
6e90e4b
e56dfa5
7cc7951
3b66fd3
fb0d325
64a11e0
1ba3018
2a64c4e
cb58dae
36d5196
3ed691a
9c6ca3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,6 +117,9 @@ pub trait Inspect<AccountId>: Sized { | |
|
||
/// Returns `true` if an `asset` exists. | ||
fn asset_exists(asset: Self::AssetId) -> bool; | ||
|
||
/// Returns `Some(true)` if an `asset` exists and is sufficient. | ||
fn asset_sufficient(asset: Self::AssetId) -> Option<bool>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure if this concept is general enough, I cannot really say. |
||
} | ||
|
||
/// Special dust type which can be type-safely converted into a `Credit`. | ||
|
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.
Should it return
None
if the asset does not exist? AndSome(false)
if it exists and is not sufficient?A better doc would be useful here
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.
You are right. It's done.
The new doc states the following:
It's already ready for review again @juangirini 😊