Uniswap/widgets

React widget not working on BNB network

Opened this issue ยท 10 comments

Bug Description:

The Uniswap React widget is not working when the network is set to Binance Smart Chain. It appears to only function properly when the network is set to Ethereum. When attempting to use the widget on Binance Smart Chain, the user balance does not show and when clicking swap i get an error that "could not estimate gas"

Steps to Reproduce:

Open the Uniswap React widget.
Set the network to Binance Smart Chain.
Attempt to use the widget to swap tokens.
Observe the error message

Expected Behavior:

The Uniswap React widget should be able to function properly on any network that it supports, including Binance Smart Chain. Users should be able to swap tokens.

Actual Behavior:

The widget is only functioning properly on the Ethereum network. When attempting to use it on Binance Smart Chain, an error message is displayed and the functionality is not available.

Workaround:

Currently, the only known workaround is to switch the network to Ethereum in order to use the Uniswap React widget. However, this may not be a viable solution for users who wish to use the Binance Smart Chain network specifically.

Reproducibility:

The issue can be reproduced consistently by following the steps outlined above.

Additional Information:

This bug was tested on the latest version of the Uniswap React widget , using the latest version of the Metamask browser extension on Google Chrome.

Also confirmed the same with Binance Smart Chain. When trying to swap, the component throws and error:
Uncaught Error: Unexpected error. Could not estimate gas for the swap.

The widget is working for other chains, like Arbitrum or Polygon, but this error only appears to be on BSC. Curiously the same error is not thrown on https://app.uniswap.org/#/swap when trying a swap on BSC. Curious what the difference is there? Is the uniswap hosted app not using this react widget?

I have same issue, has anyone solved it yet?

I have the same issue! Any update?

same here

weebuu commented

same issue! any update?

is there any update?

p3140 commented

UP

p3140 commented

Any workaround please

Any update?

I am trying to use it on tenderly forked of base, so I'm passing props like this

 jsonRpcUrlMap={{ [vTenderlyBaseChain.id]: [tenderlyBaseIdChainRpcUrl] }}
 provider={provider}

I'm using same id as base chain(8453) and tenderly's rpc url
same goes with provider

but it's giving me following error:

Screenshot 2024-05-29 at 12 39 51โ€ฏPM

I'm not sure what could be the reason, what I majorly think of is.. whether widget is taking default rpc url for base as per base chain id i'm using OR my tenderly rpc url isn't responding to widget's getQuotes specific needs?

Did anyone fix this?, i have the same issue