Uniswap / widgets

widgets-uniswap.vercel.app
GNU General Public License v3.0
122 stars 170 forks source link

React widget not working on BNB network #582

Open Bernard-Namangala opened 1 year ago

Bernard-Namangala commented 1 year ago

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.

nickfujita commented 1 year ago

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?

datnguyen-tech commented 1 year ago

I have same issue, has anyone solved it yet?

KarafiziArtur commented 1 year ago

I have the same issue! Any update?

TrejGun commented 11 months ago

same here

weebuu commented 9 months ago

same issue! any update?

padi-dev-tuannt1 commented 8 months ago

is there any update?

p3140 commented 7 months ago

UP

p3140 commented 7 months ago

Any workaround please

siddharth9903 commented 1 month ago

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?