Closed HosseinAsadi closed 2 years ago
Good catch, I've fixed this in 3adef15efab8a860126e19f91ed408f449c9c8e2.
I am using the latest version but it still returns true! :(
web3dart 2.1.4
I've just published version 2.2.0 which contains the fix.
thank you so much
Hi there
I want to check that my pwa dapp is connect to any dApp browsers like metamask or not
so i have below code
final eth = window.ethereum; if (eth != null) eth!.isConnected();
but this always return true!!
do you have suggestion for me?
It still is!! @simolus3
I can't reproduce this. We have this example: https://github.com/simolus3/web3dart/blob/4edbfd797bed74dd70333cb7de60388bc9b45b1e/example/metamask/web/main.dart#L9-L13
When I run dart pub global webdev serve
, it prints "MetaMask is not available" in a browser without metamask and opens the pop-up for browsers that have the plugin installed.
no no I did not mean that!
if (eth != null) eth!.isConnected();
isConnected()
What is the task of this?
because this function always return true with eth != null !!
In fact, I want to check to see do my dApp is connect to the metamask or not
for example if not connect, I call eth!.requestAccount();
@simolus3
Hi there
I want to check that my pwa dapp is connect to any dApp browsers like metamask or not
so i have below code
final eth = window.ethereum; if (eth != null) eth!.isConnected();
but this always return true!!
do you have suggestion for me?