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

Do not let user try recovery if one block left #1144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pythcoiner
Copy link
Collaborator

Closes #1102 and resolve @kloaec issue where 1 block recovery path was displayed recoverable even if tx not confirmed.

@nondiremanuel
Copy link
Collaborator

For the moment I assigned it to v7 since as we were discussing yesterday it is not strictly required to have it immediately (it is a behavior that should not be "regular" Liana wallet usage)

@nondiremanuel nondiremanuel added the Nice to have If it's not completed in time for the current version, it can be postponed label Jun 27, 2024
@pythcoiner
Copy link
Collaborator Author

updated wording as offered by @jp1ac4 on discord:
image

@nondiremanuel
Copy link
Collaborator

nondiremanuel commented Jul 19, 2024

Some minor comments:

  • Can we make "path" singular when there is only one recovery path available?
  • For the same reason, when there is 1 recovery path available, "select one" is not very precise. Maybe we should use a more general "please select"
  • Is "will be" correct in this case? Why not "x recovery path(s) is/are available"?

Also, was the green bar below the sentence already present? I didn't get it last time I tried iirc.

@pythcoiner
Copy link
Collaborator Author

Some minor comments:

  • Can we make "path" singular when there is only one recovery path available?
  • For the same reason, when there is 1 recovery path available, "select one" is not very precise. Maybe we should use a more general "please select"
  • Is "will be" correct in this case? Why not "x recovery path(s) is/are available"?

i'll do this

Also, was the green bar below the sentence already present? I didn't get it last time I tried iirc.
no, i added it at screenshot time!

@pythcoiner pythcoiner force-pushed the issue_1102 branch 3 times, most recently from f3f74a8 to 9b50fd3 Compare July 23, 2024 11:32
@pythcoiner
Copy link
Collaborator Author

image

image

@nondiremanuel
Copy link
Collaborator

Great thanks! The only nit that I notice remaining (not part of this change but I just noticed) is the fact that "can recover X coins" should be singular (coin) when the coin is 1. We could maybe use this PR to correct also this nit.

@pythcoiner
Copy link
Collaborator Author

image

@jp1ac4 jp1ac4 self-requested a review July 29, 2024 09:33
@jp1ac4
Copy link
Collaborator

jp1ac4 commented Jul 29, 2024

Checking again the original issue, I'm wondering if the problem was that the coin that had a recovery path available at the next block was still unconfirmed (see #1102 (comment)). The createrecovery command only considers confirmed coins.

@pythcoiner
Copy link
Collaborator Author

Checking again the original issue, I'm wondering if the problem was that the coin that had a recovery path available at the next block was still unconfirmed (see #1102 (comment)). The createrecovery command only considers confirmed coins.

You right i guess we were both (Kevin and I) testing w/ a 1 block recovery timelock, i'll look for a way to handle this edge case.

@pythcoiner
Copy link
Collaborator Author

i've added a new recovery arg to remaining_sequence() instead in order to handle the edge case

@darosior
Copy link
Member

darosior commented Aug 2, 2024

A 1-block relative locktimed transactions cannot be included in the same block as its parent. Only transactions valid in the next block can be broadcast on the network. That's the reason why createrecovery only considers confirmed coins.

@nondiremanuel
Copy link
Collaborator

Moving this and the relative issue to v8 since as per team discussion we won't be able to properly review and test it given the close deadline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Nice to have If it's not completed in time for the current version, it can be postponed
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

Grey out next button if no recovery path availables
4 participants