-
Notifications
You must be signed in to change notification settings - Fork 274
call events into dApp #187
Comments
Does |
:( nop if(eth != null) |
generally How can I call a custom event? |
This is for listening metamask events: Stream stream(String eventName) { With this or whatever you like as long as you cast the stream, for sure there are other better ways to acomplish this matter, but the problem seems to be on casting issues Stream stream(String eventName) { On the other hand, Event API in metamask tell us that "chainchanged" should be returned a String instead of "int" Stream get chainChanged => stream('chainChanged').cast(); I'm testing the package in order to use metamask in web, desktop and android with the same library using other providers. When I send a transaction to a contract it would be nice nonce field was autocalculated instead always call "getTransactionCount" on the signer(credentials) |
Hi
I need to listen some event into my dApp project
Inside your suggested document, listen to each event as follows
final eth = window.ethereum;
if (eth != null)
eth!.stream('chainChanged').listen((event) {
showSnackBar(event.toString());
});
but this does not work at all
do you have any suggestion for me?
The text was updated successfully, but these errors were encountered: