fix: prevent Trade page from fetching unnecessary swap quote#5649
fix: prevent Trade page from fetching unnecessary swap quote#5649therealemjy wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 7155e01 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Greptile SummaryThis PR fixes a superfluous swap quote fetch on the Trade page by adding a
Confidence Score: 4/5The change is safe to merge — it eliminates a redundant API call that had no effect on outputs, and the updated condition aligns exactly with the symmetric guard already present on the profit path. The core logic change is minimal and correct. The only gap is that the existing test suite has no case covering shortAmountToRepayTokens === 0, meaning the old broken behaviour would also have passed all tests — so the fix is unverified by the test suite as written. The spec file tests/index.spec.ts lacks a test for the exact scenario this PR fixes. Important Files Changed
Reviews (1): Last reviewed commit: "fix: prevent Trade page from fetching un..." | Re-trigger Greptile |
Coverage Report for ./apps/evm
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Changes