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

response to uniswap doesn't come back after approve transaction while using walletConnect to connect safe.core to uniswap. #4755

Open
Lukk18 opened this issue Jan 11, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@Lukk18
Copy link

Lukk18 commented Jan 11, 2025

Bug description

It seems that safe.global encounters issues when using Uniswap without the integrated app, especially when connecting via WalletConnect. If you skip the sponsored call for the approval transaction (and instead pay the fee with MetaMask), the response will be returned to Uniswap. In Uniswap’s code, there is a check where it takes the transaction data, parses the last 64 characters as the amount, and parses characters 64 to 104 as the spender. This check passes for safe.global, but it appears to be a coincidence. The parsed data is not the correct amount—it just happens to be a large number, which makes the check pass. Additionally, the spender is parsed as the zero address, which is also incorrect.

But what is more interesting is this:
Now, when using a sponsored call, the response doesn’t come back at all. What’s even more interesting is that even if the response did come back, the check would fail. This is because the sponsored transaction is constructed in such a way that the amount always ends up being zero due to the trailing zeros in the transaction data.

Environment

  • Browser: Chrome, Brave
  • Wallet: MetaMask
  • Chain: Any chain

Steps to reproduce

  1. Go to safe.global, launch the wallet, connect to Uniswap via WalletConnect, and try swapping ERC tokens. However, ensure that you are approving the token you are swapping for another token for the first time. This is because the approval is for an unlimited amount, and the approval transaction will not occur if you have previously approved the token you are spending.

Expected result

should get a response that approval happened.

Obtained result

permanent loading.

Screenshots

@Lukk18 Lukk18 added the bug Something isn't working label Jan 11, 2025
@FerrariGen
Copy link

@Lukk18 For the quickest resolution to your issue, we highly recommend using our live chat support, available 24/7. Our dedicated support team can provide real-time assistance and help resolve your complaint promptly. You can access the live chat here: Help SUPPORT.
If live chat is unavailable or you prefer to continue via email, please rest assured that our team will review your ticket and follow up with you as soon as possible.

1 similar comment
@FerrariGen
Copy link

@Lukk18 For the quickest resolution to your issue, we highly recommend using our live chat support, available 24/7. Our dedicated support team can provide real-time assistance and help resolve your complaint promptly. You can access the live chat here: Help SUPPORT.
If live chat is unavailable or you prefer to continue via email, please rest assured that our team will review your ticket and follow up with you as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants