starknet-io / get-starknet

StarkNet wallet <-> dApp bridge
MIT License
155 stars 110 forks source link

Web app Svelte - navigator.userAgent deprecated ? #169

Closed dubzn closed 1 year ago

dubzn commented 1 year ago

Hello! I don't know if it's ok to open an issue for this, but I wanted to comment on it if applicable, apparently if you have a svelte app using get-starknet, only one of the two wallets can be used because userAgent is deprecated by Chrome. From what I could see it is being used in the Modal.svelte: image

This is the warning I see in the browser: image

And the problem (i think) is that it is not detected to have Braavos installed, I am investigating to find some alternative way or to solve the problem. image

Dependencies (tried different versions of both starknet and get-starknet 2.0.0 doesn't work either): image

avimak commented 1 year ago

@sdgalvan tnx, could u pls provide a repo with a minimal set for reproducing the bug on my end?

dubzn commented 1 year ago

Hi avimak! Thank you for response, make this PR in my repository. You can clone an use this PR with minimal set.

avimak commented 1 year ago

@sdgalvan Braavos isn't injected in all http pages (aka unsecured webpages) but only in ["http://localhost/", "https:///*"] try using http://localhost while developing and let me know if it works for you 👍

dubzn commented 1 year ago

You're right! 🔥 Thanks for help, we should close this issue right?

avimak commented 1 year ago

Thanks for the update. out of curiosity, what's the default http url on your dev env, 127.0.0.1?

dubzn commented 1 year ago

I use a virtual machine with Ubuntu and I access from outside it through the network, so I used the ip 192.168... and not via localhost. that was the problem. image