-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending a transaction requires manually switch to Metamask to confirm #73
Comments
We also facing this type of issue, If we want to get the balance from Metamask, we need to first open the app. Anyone has any solution? Please help. |
I do have a work around, I do use url launcher and launch the metamask wallet without awaiting for that call, and them, next to it I send the transacction, it works perfectly all the time @noman200898 @GangemiLorenzo |
How do you launch the metamask wallet ? With an uri ? |
You can take a look at this code here: I added the following at line 22:
|
Thank you. I just checked, he saved the metamask uri from connection, i realized that |
Yeah, my whole point of this issue was exactly that! |
Yes it's my opinion too, it is very difficult to dev a DApps without a looooot of issues... Let's hope that will go better and better ! |
Environment
I'm trying to develop a mobile app in Flutter which should interact with a very simple contract.
The contract contains a basic string which can be read or write.
My environment is the following:
localhost
, with the contract deployed at a know address.adb-reverse
to reach the Ganache network.I'm using the following dependencies:
I use the Web3Dart code generator to generate the class to interact with my contract.
Expected behaviour
The app has a login button, which redirect the user to Metamask for the login, and it initialise the session.
After that it displays a screen with a text containing the value of the contract variable, a textField and a button.
Tapping on the button should execute a transaction that updates the value on the contract with the textField content.
Problem
After looking around on Github for examples I was able to assemble the code and make it work.
The EthClient, the Connector and the Contract are initialised correctly.
At login button tap the user is switched to Metamask and a popup ask to connect to the mobile app.
After that the user can interact with the TextField and submit the new value.
I copied the
WalletConnectEthereumCredentials
from the example folder and here's my version:When the user tap on the button, a transaction is sent.
Now if the user want to proceed he has to open manually Metamask and confirm the transaction through a popoup.
Is there a way to avoid having to move in Metamask and confirm every simple transaction every time, then switch back in the app?
I was able to automatically open Metamask every time a transaction is sent, with this code inside the
sendTransaction
:But still a confirmation for every transaction is needed.
Thanks
The text was updated successfully, but these errors were encountered: