Skip to content

Add EasyBit centralized swap integration #429

Open
divyam-eb wants to merge 5 commits intoEdgeApp:masterfrom
divyam-eb:add-easybit
Open

Add EasyBit centralized swap integration #429
divyam-eb wants to merge 5 commits intoEdgeApp:masterfrom
divyam-eb:add-easybit

Conversation

@divyam-eb
Copy link

@divyam-eb divyam-eb commented Jan 15, 2026

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Adds easybit as a centralized swap provider.

@divyam-eb divyam-eb changed the title add-easybit Add EasyBit centralized swap integration Jan 15, 2026
Copy link
Member

@paullinator paullinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. 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,
    }
  2. Response status check order (line 276-278) - Check response.ok before parsing JSON

  3. Missing JSON.parse error handling (line 492) - Wrap in try-catch

  4. Incorrect reverse quote fallback (line 390) - Don't fall back to receive amount

  5. 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 SwapBelowLimitError and SwapAboveLimitError
  • Good chain mapping implementation
  • Well-defined cleaners

@paullinator
Copy link
Member

Git Workflow Note

This PR contains a merge commit (Merge branch 'master' into add-easybit). For cleaner history, please rebase onto master instead of merging master into your feature branch:

# Instead of:
git merge master  # Creates merge commits

# Use:
git rebase master  # Keeps history linear

Rebasing 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

divyam-eb and others added 5 commits February 12, 2026 08:43
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
@divyam-eb
Copy link
Author

All Comments have been addressed. Please review @paullinator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments