Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: bye bye @avalabs/bridge-sdk, hello @avalabs/bridge-unified #57

Closed
wants to merge 13 commits into from

Conversation

meeh0w
Copy link
Member

@meeh0w meeh0w commented Oct 4, 2024

Description

  • 👋 Bye bye @avalabs/bridge-sdk (not really, though)
  • 🤗 Embrace the @avalabs/bridge-unified (comes in with CTTP, ICTT (erc20-erc20) and Avalanche Bridge integrations)

Changes

  • Lots of code removed
    • Some parts that are still using the @avalabs/bridge-sdk are still left - during the migration phase, some people may have old BridgeTransactions either in progress or completed, but not acknowledged in the UI yet. We may need a schema migration, depending on how the UnifiedBridgeSDK handles BTC tracking.
  • Simplified data flows:
    • No more useAvalancheBridge() / useBtcBridge() / useEthBridge() / useUnifiedBridge() hooks. The old, loyal useBridge() which previously combined the powers of them all is now enough to handle everything.
    • No more BridgeFormETH / BridgeFormBTC / BridgeFormAvax or BridgeFormUnified. There is a new sheriff in the Components town - the simple BridgeForm got promoted and is used directly by Bridge.tsx page.
    • Some unused components & utils got removed

The new user path

  1. User selects assets from those available for bridging on the current active network
  2. Target chains are loaded after asset is selected. The first available target chain is pre-selected.
    • User may change the target chain if there are more options than just one.

User may change the source network at any point (either by changing it in the form, or via the networks widget)
* If asset is present on the new network, the token & amount is kept in-tact.
* If asset is not present on the new network, form is reset.

Testing

  • Entire Bridge suite must be tested.
  • Remember about testing the Core Web integration as well.

Screenshots:

N/A

Checklist for the author

  • I've covered new/modified business logic with Jest test cases.
  • I've tested the changes myself before sending it to code review and QA.

@meeh0w meeh0w mentioned this pull request Oct 15, 2024
3 tasks
Base automatically changed from feat/ictt to main October 24, 2024 09:59
@meeh0w
Copy link
Member Author

meeh0w commented Oct 25, 2024

Closing in favor of updated, rebased & squashed #82

@meeh0w meeh0w closed this Oct 25, 2024
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.

1 participant