sablier-labs / v1-safe-app

Safe App for interacting with the Sablier protocol
https://sablier-v1-safe-app.vercel.app
GNU General Public License v3.0
19 stars 7 forks source link

Stop requesting access to user's web3 provider. #50

Closed TomAFrench closed 4 years ago

TomAFrench commented 4 years ago

This PR updates CreateStreamForm to use an infura connection when querying a user's token balance in order to avoid using an injected web3 provider.

This has also fixed the issue of the balance from a local provider being flashed for a second on loading.

fixes #49 fixes #31

vercel[bot] commented 4 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/tomafrench/sablier-safe-app/oyu6iiyf2 ✅ Preview: https://sablier-safe-app-git-fix-provider.tomafrench.now.sh

PaulRBerg commented 4 years ago

Great stuff, although here's a nitpick: we could've used the default provider created by ethers.js, so we avoid having to pass an Infura API key. The neat thing with ethers v5 is that the default provider is actually a collection of providers - to ensure that the data hasn't been tampered with.

Anyways, I'm rambling. Not worth it to change the way you built this.