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 transaction after signing with Maiar wallet fails on some devices #7
Comments
Hey, this is usually for wallets that aren't funded. And with Maiar App, it is simple to make that mistake. The error messages will be improved later. |
Have you reproduced it? Maybe chain type mismatch. In the env variables |
Ok, I had a short session with one from the reporters and indeed he did not have any egold on the devnet. Sorry for that, my mistake. I thought that I checked that. Another finding: When you log in via elrond web wallet - there you use maiar login the transaction cannot be signed. This is then the message in elrond wallet: |
@Alannek1992 I'll check that later, but I wonder why one would like to do that and not directly login using the maiar app ;) |
Yea, lets say it is not very common use case. But still it is a bug. I checked that and the problem seems to be occuring also in other places. So sorry for disturbing with this one. If it is okay for you then I would do the following conclusion. It seems like your handling is correct, the problem was most likely insufficient balance. But let me list some of the things I found and want to ask.
Thanks a lot for your answer and have a nice evening! PS -> so far the best dapp template I found! I especially appreciate the lightweight and easy adaptability. Its written very well and organized thus it makes that easy to understand. |
Hey, very good questions. I need to note some of them as improvements in the todo list :) As for the result parsing, the dapp uses simple int and string endpoints in useScQuery. There is no solution for more complicated structures yet. You can also check the TransactionWatcher for states. The best would be to check the docs on querying the smart contracts, contract interactions and waiting for transactions competition. As for the caching, you're right. If you use two separate applications that use this template, they could read from the same local storage, there is an expiration mechanism implemented, but of course, it isn't enough. The simplest solution would be to save the hostname and invalidate it based on that. I will add this to the list. |
Thanks a lot for your reply and taking care of some points. I ll check the TransactionWatcher, that seems to be very promising for my use case. |
Yes, I think the Transaction Watcher is the best for that. After the update to erdjs 10, there were changes, and catching the transaction status should be more accurate. |
Hi Julian,
This problem seems to be very difficult to replicate. But in general I am using your template and it works perfectly fine for me.
Recently I got a lot of reports that the sending transaction fails after signin with maiiar wallet. They have the same problem on your template website -> https://elrond-nextjs-dapp.netlify.app/.
So Far I managed to find that the line which is failing is
await apiNetworkProvider.sendTransaction(tx);
within sendTxOperation.ts.This is then very general exception:
Error: Request error on url [transactions]: [{"statusCode":400,"message":""}] at ApiNetworkProvider.handleApiError (apiNetworkProvider.js?5989:213:1) at ApiNetworkProvider.eval (apiNetworkProvider.js?5989:202:1) at Generator.throw (<anonymous>) at rejected (apiNetworkProvider.js?5989:6:42)
This really happening only for some users, at the moment I have no idea why.
Do you have any hints, what might be wrong?
Thanks a lot!
The text was updated successfully, but these errors were encountered: