-
Notifications
You must be signed in to change notification settings - Fork 122
fix(eth-flow): fix refund tx detection #5904
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe updates refactor and clarify ETH-flow order status handling in the frontend. They modularize transaction state logic, refine refund and expiration checks, and make type exports explicit. The changes aim to ensure ETH-flow orders display accurate statuses, particularly for refund and expiration scenarios, without altering core logic elsewhere. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant EthFlowStepper
participant Order
participant TxStore
User->>EthFlowStepper: View ETH-flow order status
EthFlowStepper->>Order: Fetch order details
EthFlowStepper->>TxStore: Fetch related transactions
EthFlowStepper->>EthFlowStepper: getCreationTxState(order, allTxs)
EthFlowStepper->>Order: Check refundHash and status
EthFlowStepper-->>User: Display accurate order status (Created, Refunded, Expired, etc.)
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Suggested labels
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
yarn install v1.22.22 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🧰 Additional context used🧠 Learnings (5)📓 Common learnings
apps/cowswap-frontend/src/common/updaters/orders/ExpiredOrdersUpdater.ts (1)
apps/cowswap-frontend/src/modules/ethFlow/pure/EthFlowStepper/steps/Step3.tsx (3)
apps/cowswap-frontend/src/modules/ethFlow/containers/EthFlowStepper/index.tsx (3)
apps/cowswap-frontend/src/modules/ethFlow/pure/EthFlowStepper/steps/Step2.tsx (4)
🧬 Code Graph Analysis (2)apps/cowswap-frontend/src/common/updaters/orders/ExpiredOrdersUpdater.ts (1)
apps/cowswap-frontend/src/modules/ethFlow/pure/EthFlowStepper/steps/Step2.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (18)
✨ Finishing Touches
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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
hash: order.refundHash, | ||
failed: didRefundFail(order), | ||
hash: refundHash, | ||
failed: !refundHash, |
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.
The actual fix, other changes in this file is just a refactoring
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 addressing this issue!
Summary
Fixes #5883
I couldn't reproduce this case:

But I fixed it blindly, please review this commit carefuly: e0b0f54
Other cases are fixed:
To Test
See Fixes #5883
Summary by CodeRabbit
Refactor
Style
Bug Fixes