Synthetixio / kwenta

DEPRECATED. Please use: https://github.com/Kwenta/kwenta
MIT License
11 stars 20 forks source link

some initialization fixes #444

Closed dbeal-eth closed 3 years ago

dbeal-eth commented 3 years ago

this has a side effect of not showing the trending synths until wallet is init. let me know if this should be changed. if there is a suggeston on how to more easily get this data in a way that is not expensive, please advise. I spent way too long and could not find a better solution for the time being.

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/synthetixio/kwenta/3ZkNp3vd62eFuyDRx9vgWkynDsja
✅ Preview: https://kwenta-git-fix-provider-synthetixio.vercel.app

jcmonte commented 3 years ago

Okay everything looks good now and works locally, but did we change how the provider is being injected? I noticed that trying to test from a deployed vercel instance throws a bunch of infura 403s even when the wallet is connected. (403s because we only whitelist specific domains -- it won't happen in prod) Typically when the wallet is connected this shouldn't happen because we use the injected provider.

Latest deployment to replicate: https://kwenta-o8qek6k5x-synthetixio.vercel.app/

Found the issue. Need to inject the browser provider into the queries context. Going to fix this in the L2 branch. https://github.com/Synthetixio/kwenta/pull/281/commits/78b81e7fa57d0e24e87743b9ec836bf25332a9da