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

Refresh the state of the wallet after broadcasting a transaction #887

Closed
darosior opened this issue Dec 15, 2023 · 4 comments · Fixed by #1010
Closed

Refresh the state of the wallet after broadcasting a transaction #887

darosior opened this issue Dec 15, 2023 · 4 comments · Fixed by #1010
Assignees
Labels
Daemon / Liana library This is about lianad or the liana library (not the GUI)

Comments

@darosior
Copy link
Member

This is in view of having a nicer UX when sending a transaction in the GUI. Our broadcast command should trigger the poller to do a round of updates. I'm not sure how best to update the poller to be listening for such requests, or to otherwise be able to trigger a single round of updates.

@darosior darosior added the Daemon / Liana library This is about lianad or the liana library (not the GUI) label Dec 15, 2023
@kloaec
Copy link
Collaborator

kloaec commented Jan 10, 2024

this is much needed, it is frustrating to click home knowing it's displaying a past state but the poller is just taking its time.

@edouardparis
Copy link
Member

If we have the table transactions cache, the broadcast command could do:

  • set the coins as spending (set the spend_txid) in database
  • store the transaction in the table
  • create change coins

Then no need to call for a poller update,

@darosior
Copy link
Member Author

I'd rather not share the same responsibility over multiple pieces of code..

@darosior
Copy link
Member Author

Also of course there is more to updating the database: we have some invariants which would be nice to not break just for the sake of not reusing the poller (what for?). For instance consistency with the chain tip. Trying to make these invariants hold would boil down to simply rewriting the poller's logic.

edouardparis added a commit that referenced this issue Feb 2, 2024
…ns that will be dropped

fde28bf gui(transactions): get prev feerate from tx instead of param (jp1ac4)
dc817de gui(transactions): check for direct descendants before rbf (jp1ac4)
881d9a7 gui(psbt): check for conflicting txs before broadcast (jp1ac4)
beabf08 gui: match on message for PsbtState (jp1ac4)
9e5872c gui(transactions): reword rbf modal message (jp1ac4)
c50954e gui(transactions): split strings across multiple lines (jp1ac4)

Pull request description:

  This is for #903.

  It adds two warnings to the GUI:
  - when creating a new RBF if there are any descendant transactions of the transaction to be replaced:
  ![image](https://github.com/wizardsardine/liana/assets/121959000/b3d91253-fa5f-4c4c-b3f7-1e22d56ff0ba)

  - when broadcasting a transaction if there are any conflicting transactions
  ![image](https://github.com/wizardsardine/liana/assets/121959000/c3c8d932-e2d9-4982-9f5d-c7cf15d53370)

  These warnings are generated in the GUI using coins data from the DB and so will not appear if the DB coins have not yet been updated. Would resolving #887 help ensure the coins are updated before running these checks?

ACKs for top commit:
  edouardparis:
    ACK fde28bf

Tree-SHA512: 3c428439926448a1d1fd0deb161b2b4016fcd6c4e2c0792ceb36e2c8bfc545ee5849ee76a6a89573a4389c6033bfe8ebd9f68555eca8a4f8f0e5fe1ac780be6d
@darosior darosior self-assigned this Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daemon / Liana library This is about lianad or the liana library (not the GUI)
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants