You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HIGH — 2 of 3 wBTC address occurrences not fixed in pool registry
Only the SUI/wBTC entry in poolMap.ts was updated from 0x27792d... to 0x027792d.... However, the same incorrect address appears in two more entries that were NOT fixed:
wBTC / wUSDC (Cetus) pair key
wBTC / USDC (Bluefin + Cetus) pair key
If 0x027792d... is the correct canonical address (which this PR asserts by fixing SUI/wBTC), then these other two entries will also fail type-based lookups. The fix should be applied consistently across all occurrences.
MEDIUM — getPoolIdByTypesAndProtocol is marked async unnecessarily
getPoolIdsByTypes is synchronous (returns ProtocolPoolIds, not a Promise), but the new method uses async/await on it. This was likely copy-pasted from getPoolIdBySymbolsAndProtocol which is legitimately async. Not a bug (await on a non-Promise resolves immediately), but misleading. Consider removing async/await or adding a comment.
LOW — Only 2 call sites changed to type-based lookup
The PR changes two getPoolIdBySymbolsAndProtocol calls in depositBluefinSuiSecondTx and withdrawBluefinSuiSecondTx to use the new type-based method, but only for the 'cetus' protocol argument. Worth confirming no other strategies have the same pattern where poolLabel.assetA.name / poolLabel.assetB.name is used with symbol-based lookup and would hit the same issue.
LOW — Error message says "or" instead of "/"
thrownewError(`Pool for protocol: ${protocol} not found for coin pair: ${typeA} or ${typeB}`,);
Should be "typeA / typeB" or "typeA and typeB" since it's a pair, not an alternative.
Summary
#
Severity
Finding
1
HIGH
2 of 3 wBTC address occurrences not fixed in pool registry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.