feat(frontend): polish on-chain pending transaction state#2221
feat(frontend): polish on-chain pending transaction state#2221stackingsaunter wants to merge 2 commits intofeat/remove-node-onchain-transactions-cardfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/src/components/channels/OnchainTransactionsTable.tsx (1)
69-69: Consider aligning pending predicate withtransactionStatusLabellogic.
isPendingcurrently checks only"unconfirmed", while status text treats any non-"confirmed"state as pending. Using one condition avoids future drift across label vs styling logic.♻️ Suggested small consistency refactor
- const isPending = tx.state === "unconfirmed"; + const isPending = tx.state !== "confirmed";🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/src/components/channels/OnchainTransactionsTable.tsx` at line 69, The isPending predicate only checks for tx.state === "unconfirmed" which can diverge from the transactionStatusLabel logic that treats any state !== "confirmed" as pending; update the isPending computation (used in OnchainTransactionsTable) to mirror transactionStatusLabel's condition by treating any tx.state that is not "confirmed" as pending so styling and labels remain consistent across tx.state, isPending, and transactionStatusLabel.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@frontend/src/components/channels/OnchainTransactionsTable.tsx`:
- Line 69: The isPending predicate only checks for tx.state === "unconfirmed"
which can diverge from the transactionStatusLabel logic that treats any state
!== "confirmed" as pending; update the isPending computation (used in
OnchainTransactionsTable) to mirror transactionStatusLabel's condition by
treating any tx.state that is not "confirmed" as pending so styling and labels
remain consistent across tx.state, isPending, and transactionStatusLabel.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 87c81398-9e11-446f-9e18-1049637c2c73
📒 Files selected for processing (1)
frontend/src/components/channels/OnchainTransactionsTable.tsx
|
coderabbit is right, but it was like that before. |
c84997a to
dc3b22a
Compare
Treat unconfirmed on-chain transactions as pending in Wallet UI. Keep backend state values unchanged while aligning labels and styling. Made-with: Cursor
…mpty state Aligns terminology with bitcoin.design convention: "transaction" for on-chain, "payment" for lightning. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
839bbbc to
eed9082
Compare
Summary
Test plan
Made with Cursor
Summary by CodeRabbit