Add EasyBit centralized swap integration #429
Add EasyBit centralized swap integration #429divyam-eb wants to merge 5 commits intoEdgeApp:masterfrom
Conversation
paullinator
left a comment
There was a problem hiding this comment.
Review Summary
Thanks for adding EasyBit as a swap provider! The implementation follows the established plugin patterns well. However, there are a few critical issues to address before merging.
Critical Issues
-
Plugin not registered in
src/index.ts- The plugin needs to be imported and added to the plugins object:import { makeEasyBitPlugin } from './swap/central/easybit' const plugins = { // ... existing plugins easybit: makeEasyBitPlugin, }
-
Response status check order (line 276-278) - Check
response.okbefore parsing JSON -
Missing JSON.parse error handling (line 492) - Wrap in try-catch
-
Incorrect reverse quote fallback (line 390) - Don't fall back to receive amount
-
Unused import (line 13) - Remove
EdgeMemo
See inline comments for specific issues and suggested fixes.
Positive Observations
- Correct order lifecycle (orders created in
approve()) - Proper use of
SwapBelowLimitErrorandSwapAboveLimitError - Good chain mapping implementation
- Well-defined cleaners
Git Workflow NoteThis PR contains a merge commit ( # Instead of:
git merge master # Creates merge commits
# Use:
git rebase master # Keeps history linearRebasing keeps the commit history linear and makes the PR easier to review. You can do this with: git checkout add-easybit
git rebase master
git push --force-with-lease |
fb261ed to
de46144
Compare
a. Updated Response Status b. JSON.parse() try-catch added c. Error for reverseQuote updated d. EdgeMemo removed e. API Masking issue updated with error catch f. expireTime and ensureInFuture import removed g. refundAddress is added in orderBody
177080b to
fbce9ed
Compare
|
All Comments have been addressed. Please review @paullinator |
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Adds easybit as a centralized swap provider.