Viem Migration - feat: transaction dedup guard and fillability fix#7289
Viem Migration - feat: transaction dedup guard and fillability fix#7289
Conversation
…2-wallet-connection-eip-6963
…2-wallet-connection-eip-6963
The branch fixed hyphenated SVG attributes (stroke-width → strokeWidth) and added a safeSize guard against division-by-zero. React silently ignores hyphenated SVG attributes, making the progress circle invisible. Reverting because this bug also exists on develop and is not related to the viem migration. Can be addressed in a separate PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The branch added a pre-check against tokensByAddress map to avoid false "Import token" prompts for tokens already in active lists, plus a loading guard to prevent flickering during SWR fetch. Reverting because this bug also exists on develop and is not related to the viem migration. Can be addressed in a separate PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The branch expanded the Cancelling status guard so that failed Safe cancellation transactions reset the order back to Pending. Without this, orders stay stuck in "Cancelling" permanently after a rejected Safe tx. Reverting because this bug also exists on develop and is not related to the viem migration. Can be addressed in a separate PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed the deduplication set (finalizedEthereumTxDedupeKeys) that prevented the same transaction from being finalized twice, and the pageLoadTime guard that suppressed notifications for transactions added before page load. These fixes address pre-existing bugs on develop (duplicate finalization on fast re-renders, stale "Transaction mined" toasts on page reload) but are not related to the viem migration. Keeping only the viem-required changes: import swap to viem TransactionReceipt and Hex cast for safeTransactionHash. Also reverted finalizeEthFlowTx and finalizeOnChainCancellation to develop (they had shouldShowNotification parameter added for the page-load guard).
Removed the module-level swap flow lock (acquireSwapFlowLock/releaseSwapFlowLock) that prevented concurrent swap flows across component instances. The per-component flowInProgressRef already provides re-entrancy protection. This was new logic not related to the viem migration. The lack of a cross-instance guard is a pre-existing condition on develop. Can be addressed separately. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed the new utility that computed outstanding sell amount for partially-filled TWAP orders. No callers remain (the import was already removed from useOrdersFillability in a previous change). This was new logic not related to the viem migration. The TWAP partial-fill fillability bug is a pre-existing condition on develop. Can be addressed in a separate PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reverted TwapOrdersUpdater.tsx to develop structure (re-inlined logic), keeping only the ComposableCoW → ComposableCowContractData type swap. Deleted new files not related to viem migration: - twapOrdersUpdater.helpers.ts (extracted helpers + new orphan/stale-nonce logic) - shouldCheckOrderAuth.ts (extracted auth check) - useTwapOrdersUpdateInterval.ts (extracted interval hook) Removed mergePersistedSigningTwapOrders from buildTwapOrdersItems.ts (new WaitSigning/Cancelling reconciliation logic). Kept the Hex casts required by viem migration. These were refactoring and new features not related to viem migration. Pre-existing bugs can be addressed in separate PRs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restored tradeButtonsMap back into tradeButtonsMap.tsx (as on develop). Deleted the extracted files: tradeButtonsMap.record.tsx, tradeButtonsMap.types.ts, tradeButtonsMap.utils.ts. This was a pure code organization refactor not related to viem migration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restored the original useState + useEffect accumulation pattern from develop. The useMemo simplification was not related to viem migration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed the onTxFailed callback and TX_REPLACED listener from processTwapCancellation. Kept the viem-required change: receipt.status comparison from === 1 to === 'success'. The onTxFailed/TX_REPLACED handling was new logic not related to viem migration. The stuck Cancelling state bug is pre-existing on develop. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Re-adds features reverted from the viem migration PR: - finalizeEthereumTransaction: dedup set prevents same tx finalized twice, page-load guard suppresses stale notifications on reload - getRemainingSellAmountForFillability: computes remaining sell amount for partially-filled TWAP orders to fix false "Unfillable" status Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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: Repository UI 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 |
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Summary
Re-adds features reverted from the viem migration PR to keep migration scope minimal: