Skip to content
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

To store locally the submitted transactions until they are returned by the network #139

Open
sallymoc opened this issue Sep 23, 2024 · 4 comments · May be fixed by #190
Open

To store locally the submitted transactions until they are returned by the network #139

sallymoc opened this issue Sep 23, 2024 · 4 comments · May be fixed by #190
Assignees
Labels
Enhancement New feature or request

Comments

@sallymoc
Copy link
Contributor

sallymoc commented Sep 23, 2024

A transaction is returned by the rpc api once the target tick is lower than current tick.
While the transaction is 'waiting for execution' it should be stored safely locally and to have a 'pending' status.
It can happen that the network never returns it and if the ticket is passed, it can be be changed as "Failed-Invalid'.
When the user erase the wallet, all the transactions store locally should be deleted from the device.

@sallymoc sallymoc self-assigned this Sep 23, 2024
@sallymoc sallymoc moved this from Ready to Backlog in Wallet App Kanban Board Sep 23, 2024
@sallymoc sallymoc added the Enhancement New feature or request label Sep 23, 2024
@sallymoc
Copy link
Contributor Author

sallymoc commented Oct 8, 2024

@ahmed-tarek-salem could you please have a look if there is something currently implemented for this?
My understanding is that qubic-li was storing in its database the submitted trx so we could see them as pending.
After the change in apis, I guess we loose/will loose the capability to see the pending transactions unless that we implement was is described above.

@ahmed-tarek-salem
Copy link
Contributor

@sallymoc

Yes, you are right.
There is nothing currently dealing with pending transactions. It's the qubic-li itself.

@ahmed-tarek-salem ahmed-tarek-salem self-assigned this Oct 28, 2024
@ahmed-tarek-salem
Copy link
Contributor

@sallymoc

  • Does it mean that the network only returns successful transactions?

  • If we save the invalid locally it means they will appear permanently until the user erases the wallet, but the current logic gets the transactions only related to the current epoch, should we delete them after the current epoch is passed or what?

@sallymoc
Copy link
Contributor Author

@ahmed-tarek-salem

A case of invalid trx returned as failed by the network is when there is not enough balance to execute it (actually the transfer is what failed, moneyflew false).

A case of trx not returned by the network I think is when you 'schedule' more than one trx for the future. Please see here https://qubic.github.io/integration/Partners/tx-based-use-case.html#rule-1-one-concurent-tx-per-source-address the scenario described for Rule 1.
integration
TX Based Exchange integration
A Documentation how to interact with Qubic
The network will ignore the trx for tick 10, so it will never return it as failed.

I think we can keep it even when the epoch has passed so the user still can resend it. I think it would also make sense to add a Delete option for the "Failed-Invalid'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
Status: In review
2 participants