osmosis-frontend icon indicating copy to clipboard operation
osmosis-frontend copied to clipboard

Bridge Integration

Open jonator opened this issue 3 years ago • 3 comments

Integrates Axelar transfers directly into frontend, with the option to connect MetaMask and/or EVM WalletConnect.

Key components

  • Observable MetaMask and observable WalletConnect objects for interfacing with respective wallet.
  • /integrations/ folder containing an /axelar/ folder with a modal view, queries, config, and types needed by Axelar.
  • BridgeTransfer modal that dynamically imports all Axelar transfer dependencies. Saves ~317kb from initial loaded bundle.
  • Integration is enabled for an IBC asset by adding a AxelarBridgeConfig to the originBridgeInfo member of an entry in ibc-assets.ts's IBCAssetInfos list
  • IBC transfers now use the new and improved UI + animation. Maintains support for copying addresses on mobile, and editing the withdraw address.
  • For mobile, I'm simply going to scale the view down

TODO:

  • [x] Add lottie/bridge animation from Nikita and Syed
  • [ ] Mobile design
  • [x] Add hardcoded Axelar bridge fee to AxelarBridgeConfig
  • [x] Ensure user has correct network selected in wallet

jonator avatar Aug 11 '22 16:08 jonator

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
osmosis-frontend ✅ Ready (Inspect) Visit Preview Sep 14, 2022 at 8:07AM (UTC)
osmosis-frontier ✅ Ready (Inspect) Visit Preview Sep 14, 2022 at 8:07AM (UTC)

vercel[bot] avatar Aug 11 '22 16:08 vercel[bot]

I think we need to implement logic to check what the user’s active network on Metamask is set to. If it isn't Ethereum, we should request the user to change it to Ethereum (https://docs.metamask.io/guide/ethereum-provider.html#basic-usage)

dogemos avatar Aug 15 '22 09:08 dogemos

Yeah, I also realized that needed to be added to the outstanding to do list.

jonator avatar Aug 15 '22 14:08 jonator

Note: the large number of line changes are largely from the lottie animation JSON files; 38k and 18k lines.

jonator avatar Sep 02 '22 17:09 jonator