Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
1f0dea4 to
9b3fcd3
Compare
| MAX_BASIS_POINTS, | ||
| ); | ||
| // Use the oracle price to calculate the minimum output needed | ||
| let output_amount = output_amount_floor( |
There was a problem hiding this comment.
Maybe we could rename this to min_output_amount as below?
|
|
||
| #[derive(Debug, Decode, TypeInfo, Clone, PartialEq, Eq, Encode)] | ||
| pub enum SwapFailureReason { | ||
| // Batch swap failed due to price impact limit, |
There was a problem hiding this comment.
nit: why not /// doc comments ?
further nit: punctuation is a little weird/inconsistent... trailing comma makes the comments look incomplete.
| (None, _) | (_, None) => { | ||
| // Ignore the oracle price check if not supported/available | ||
| // for one of the assets. | ||
| }, |
There was a problem hiding this comment.
Do we allow oracle swaps for assets where the prices aren't available? ie. is it possible to submit an oracle swap for FLIP -> DOT?
There was a problem hiding this comment.
Yes, This was one of the points I listed in #6039 to ask you about. I want to block swap requests that use the oracle without support. But was going to do it in another PR. Shall I create an issue?
Pull Request
Closes: PRO-2453
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
SwapAborted.SwapAbortedevent both when a swap is canceled and when a swap fails.SwapFailedReason