-
Notifications
You must be signed in to change notification settings - Fork 87
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
fix: essence tranche token metadata #1798
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.
Thanks for taking care of this fix @wischli and add tests related to it 💯
Just one NIT but LGTM!
tranche.currency.into(), | ||
), | ||
) | ||
.ok_or(DispatchError::CannotLookup)?; |
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.
Thanks for cleaning that weird ok_or
and removing the unwrap()
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.
Yeah that code path gave me shivers
token_name: BoundedVec::try_from("ResName".as_bytes().to_owned()) | ||
.expect("String not out of bounds"), | ||
token_symbol: BoundedVec::try_from("ResSym".as_bytes().to_owned()) | ||
.expect("String not out of bounds"), |
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.
NIT. If the test does not check token_name
or token_symbol
you can avoid initializing them using directly BoundedVec::default()
to ease the reading of the test (same below)
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 are checking the tranche metadata in L2498 which is why I did not want to use default values 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.
Ah ok, I didn't see it. Then everything is perfect!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1798 +/- ##
=======================================
Coverage 48.45% 48.45%
=======================================
Files 168 168
Lines 13331 13332 +1
=======================================
+ Hits 6459 6460 +1
Misses 6872 6872 ☔ 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.
Reapproving!
Description
Slack thread
We can hold this until #1756 is merged
Changes and Descriptions
essence
which is used forUpdated
eventChecklist: