Skip to content

Integrate LI.FI provider #716

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

Open
wants to merge 20 commits into
base: beta/wallet
Choose a base branch
from

Conversation

JulesFiliot
Copy link

@JulesFiliot JulesFiliot commented Jun 19, 2025

closes #697

Copy link

changeset-bot bot commented Jun 19, 2025

⚠️ No Changeset found

Latest commit: 7346075

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@status-im-auto
Copy link
Member

status-im-auto commented Jun 19, 2025

Jenkins Builds

Click to see older builds (6)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 39bd946 #1 2025-06-19 08:45:03 ~1 min wallet 📦zip
✔️ 87e9241 #2 2025-06-23 05:18:32 ~58 sec wallet 📦zip
14a52cd #3 2025-06-23 09:03:47 ~2 min wallet 📄log
✔️ 4e2ebb2 #4 2025-06-23 09:05:27 ~1 min wallet 📦zip
✔️ 8f8cc04 #5 2025-06-24 09:06:54 ~59 sec wallet 📦zip
✔️ 71ef252 #6 2025-07-07 11:30:41 ~1 min wallet 📦zip
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 54b8933 #7 2025-07-17 15:43:52 ~1 min wallet 📦zip
✔️ 7346075 #9 2025-07-17 18:21:13 ~1 min wallet 📦zip

Copy link

vercel bot commented Jun 19, 2025

@JulesFiliot is attempting to deploy a commit to the Status Team on Vercel.

A member of the Team first needs to authorize it.

@JulesFiliot JulesFiliot force-pushed the topic-integrate-lifi-clean branch from 87e9241 to 14a52cd Compare June 23, 2025 09:01
@felicio
Copy link
Collaborator

felicio commented Jul 7, 2025

@JulesFiliot could you please share an update on this one?

@JulesFiliot
Copy link
Author

@JulesFiliot could you please share an update on this one?

Hey @felicio, yes! Sorry for being silent, I've worked a lot on it, including every day of last week. I'll push all my local code today. It's honestly a lot of work because I have to update the connector, wallet API, ethereum transactions handler (apps/wallet/src/data/ethereum/ethereum.ts) and etherscan API methods to support all the transactions needed for the Li.Fi widget. The work is way deeper than just adding the widget UI.

So right now I successfully implemented:

  • Swapping on the same chain (i.e. ETH to DAI on base).
  • Bridging (i.e. ETH on mainnet to ETH on base).
  • Multi-chain support. Opening the exchange dialog will automatically select the token on the correct chain from the current detail view.

What I'm still working on:

  • Bridging + swapping at the same time (i.e. ETH on base to DAI on mainnet).

It has been a lot of trials and errors so my code is a bit dirty, I need to clean it before pushing. I'll try my best to integrate bridging + swapping at the same time today.


P.S.: Thanks to @jkbktl's help. He built the first draft of the wallet connector for the portfolio's wagmi provider which allows the li.fi widget to connect to our internal wallet. It helped me a lot.

@JulesFiliot
Copy link
Author

@felicio (cc @jkbktl), I just pushed my changes.
The three following features are working:

  • Swapping on the same chain (i.e. ETH to DAI on base).
  • Bridging (i.e. ETH on mainnet to ETH on base).
  • Bridging + swapping at the same time (i.e. ETH on base to DAI on mainnet).
  • Multi-chain support. Opening the exchange dialog will automatically select the token on the correct chain from the current detail view. (Sometimes the correct chain selection doesn't work I didn't have the time to investigate this problem)

What should be improved:

  • Gas calculation, especially on L2 where it's too high (it can be $6 when we will really pay 10 cents).
  • When a transaction is already completed but the UI is still loading, it can take a few minutes to appear as successful on the UI.
  • Error handling: error pops over the exchange dialog (you have to press ESC to hide it), it's bad UI/UX. I'm not sure why but the "not enough funds" error we throw appears as "unknown RPC error" (since gas estimation for L2 is high we'll get this error if we have very little funds on our wallet).

@JulesFiliot JulesFiliot marked this pull request as ready for review July 7, 2025 11:43
@JulesFiliot JulesFiliot changed the title [WIP] topic integrate lifi topic integrate lifi Jul 10, 2025
@JulesFiliot
Copy link
Author

Hey @jkbktl @felicio I forgot to ask if you could review the PR please 🙏 ? I don't have the rights to add reviewers to the PR.

As I mentioned here #716 (comment) there are still things that could be improved but I think the diff from this PR is already huge and I already spent a lot of time working on this so I'd prefer if we can review and ship this. The core features of the widget are working so I would say this is acceptable to ship as is.

@felicio felicio requested review from a team, jkbktl, felicio and marcelines July 17, 2025 08:55
@felicio felicio force-pushed the topic-integrate-lifi-clean branch from 71ef252 to 54b8933 Compare July 17, 2025 15:42
@felicio felicio changed the base branch from main to beta/wallet July 17, 2025 15:42
@felicio felicio changed the title topic integrate lifi Integrate LI.FI provider Jul 17, 2025
@felicio felicio linked an issue Jul 17, 2025 that may be closed by this pull request
@JulesFiliot
Copy link
Author

Hey @felicio I see you did some edits on this PR, do you need any input/support from me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🚧 In Progress
Development

Successfully merging this pull request may close these issues.

Integrate LI.FI provider
4 participants