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
@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
@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