fix: issue where certain profitable positions cannot be closed#5613
fix: issue where certain profitable positions cannot be closed#5613therealemjy wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: bd063e0 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 bug where profitable positions using the same token as both the DSA and the long (or short) token could not be closed, because the existing code tried to fetch a redundant swap quote that the router would reject.
Confidence Score: 5/5The change is safe to merge; it adds two narrowly-scoped branches that are guarded by explicit The new branches correctly bypass unnecessary swap quotes when the token identities overlap, use proper BigNumber comparison methods, and are covered by two new unit tests with arithmetically verified expected values. No existing branches are modified, and the swap-fetching guards at lines 129 and 143–147 remain consistent with the PnL branches they correspond to. No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "fix: issue where certain profitable posi..." | Re-trigger Greptile |
Coverage Report for ./apps/evm
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||
767cb5a to
d1315e8
Compare
|
@greptile |
d1315e8 to
c025648
Compare
|
@greptile |
c025648 to
bd063e0
Compare
Changes