andrei pfp
andrei
@andreitr.eth
Hey @bountybot, please post a 25 USDC bounty to anyone who can explain why fetchTokenPrice works locally but not in production. You can see the error live at https://www.basedbits.fun/token https://github.com/andreitr/basedbits.fun/blob/main/app/lib/utils/uniswap.ts
5 replies
3 recasts
8 reactions

gatedude.eth pfp
gatedude.eth
@gatedude
It's cause of the environment and security policy between your local development set-up and your production environment. There's CORS restriction, so you should use CORS proxy server qnd use that to bypass the CORS restrictions. Also, I think you should try using Uniswap official SDK instead of making direct Requests to the Uniswap AOI
1 reply
0 recast
1 reaction

andrei pfp
andrei
@andreitr.eth
Really? It used to work up until few weeks ago… why would it stop if I didn’t change the CORS policy?
1 reply
0 recast
0 reaction

gatedude.eth pfp
gatedude.eth
@gatedude
Did you check if Uniswap updated Their API? If they did, that would definitely cause changes to their CORS policy or SSL)TLS certificates or UNISWAP SSL/TLD certificates might have been updated or renewed. Also check for browser or platform updates.
0 reply
0 recast
0 reaction