-
Notifications
You must be signed in to change notification settings - Fork 91
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: pool fee event dispatch order #1809
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.
Clean and with its own test. Perfect!!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1809 +/- ##
==========================================
+ Coverage 48.56% 48.58% +0.02%
==========================================
Files 168 168
Lines 13344 13359 +15
==========================================
+ Hits 6480 6490 +10
- Misses 6864 6869 +5 ☔ 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.
Changes re the pool fee event look good!
Something I realized that is completely unrelated to this PR, but was looking at the pool-registry
code: shouldn't we emit an MetadataSet
event here:
PoolMetadata::<T>::insert( |
If we do that, we should emit this event after the T::ModifyPool::create
call
pallets/pool-system/src/impls.rs
Outdated
@@ -183,10 +183,6 @@ impl<T: Config> PoolMutate<T::AccountId, T::PoolId> for Pallet<T> { | |||
.map_err(|_| Error::<T>::FailedToRegisterTrancheMetadata)?; |
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 we move the T::AssetRegistry::register_asset
calls in the loop also to below the PoolSystem::Created
event? Not an issue now, but I can imagine this also creating issues down the road
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 we move the
T::AssetRegistry::register_asset
calls in the loop also to below thePoolSystem::Created
event? Not an issue now, but I can imagine this also creating issues down the road
Definitely! 41d56aa
Thanks for raising this. Fixed in #1811 Seems like this should be added after the |
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.
LGTM!!
Description
Checklist: