-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: use encoded address in ccm deposit metadata in events #5192
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5192 +/- ##
======================================
- Coverage 70% 70% -0%
======================================
Files 481 481
Lines 86087 85969 -118
Branches 86087 85969 -118
======================================
- Hits 60399 60224 -175
- Misses 22419 22475 +56
- Partials 3269 3270 +1 ☔ View full report in Codecov by Sentry. |
@@ -1966,7 +1966,14 @@ pub mod pallet { | |||
output_address: T::AddressConverter::to_encoded_address( | |||
output_address.clone(), | |||
), | |||
ccm_deposit_metadata: ccm_deposit_metadata.clone(), | |||
ccm_deposit_metadata: cf_chains::CcmDepositMetadataEncoded { |
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.
I think CcmDepositMetadata
is also exposed via the CcmFailed event, so that one should be updated to use the encoded version.
@@ -688,6 +688,14 @@ mod ccm { | |||
#[track_caller] | |||
fn init_ccm_swap_request(input_asset: Asset, output_asset: Asset, input_amount: AssetAmount) { | |||
let ccm_deposit_metadata = generate_ccm_deposit(); | |||
let ccm_deposit_metadata_encoded = cf_chains::CcmDepositMetadataEncoded { |
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 could have a method on CcmDepositMetadata
to convert it into the encoded verson (taking AddressConverter as a generic parameter?). Or you can look at how it is done for ChannelRefundParametersGeneric
.
* feat: add fok and dca params to SwapRequested event * chore: test dca and fok parameters are in event
Pull Request
Closes: PRO-1597
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
Made
CcmDepositMetadata
generic so we can encode the address inside of it when outputting it in the swap requested event and the ccm failed event.