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

Fix .txn file import for ColdCards #11662

Merged
merged 4 commits into from
Oct 11, 2023

Conversation

adamPetho
Copy link
Collaborator

Addresses: #9856 (comment)

Might fix completely: #9856

When the user sets this settings on ColdCard (settings>delete psbts>normal/delete) to delete,
ColdCard deletes the PSBT files from the SD card.
What's left is a signed .txn file.

Wasabi almost supported this, but because we throw this ex:
throw new FormatException("An error occurred while loading the PSBT file.", ex);
the fallback mechanism didn't have a chance to run.

With this PR I was able to broadcast the .txn file properly.

Comment on lines -102 to -105
catch (FormatException ex)
{
throw new FormatException("An error occurred while loading the PSBT file.", ex);
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasabi couldn't broadcast the .txn file, because here we throw an exception, instead of letting it run to the "fallback" catch block.

If the fallback fails too, we are catching the exception outside and an error dialog will be shown to the user.

@adamPetho adamPetho requested a review from Szpoti October 10, 2023 09:29
Copy link
Collaborator

@Szpoti Szpoti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

Copy link
Collaborator

@turbolay turbolay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Copy link
Collaborator

@yahiheb yahiheb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@adamPetho
Copy link
Collaborator Author

We tested this in the office with @Szpoti and I'm not aware of anyone having a CC at home, so merging.

@adamPetho adamPetho merged commit 362b7de into WalletWasabi:master Oct 11, 2023
7 checks passed
adamPetho added a commit that referenced this pull request Nov 28, 2023
* add fallbacks when PSBT loading fails

* add .txn file support to FileDialogs

* Typo

* add log messages + remove unused usings

---------

Co-authored-by: yahiheb <52379387+yahiheb@users.noreply.github.com>
(cherry picked from commit 362b7de)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants