Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

fix(wallet): handle binary psbt properly #217

Merged

Conversation

humanumbrella
Copy link
Contributor

Description

Per spec psbt file is actually in binary. Support this while continuing to support base64/hex as well.

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR fix an open issue?

  • Yes
  • No

@humanumbrella humanumbrella requested a review from bucko13 March 16, 2021 00:37
Copy link
Contributor

@bucko13 bucko13 left a comment

Choose a reason for hiding this comment

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

:shipit: !

// If the binary -> hex conversion starts with this magic number, we're
// good to go. Otherwise - it was likely not a binary file, meaning
// it was is probably base64 or hex, so we should try using text instead.
if (psbtHex.startsWith(PSBT_MAGIC_HEX)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@waldenraines waldenraines merged commit 959f111 into unchained-capital:master Jun 1, 2021
@humanumbrella humanumbrella deleted the read-psbt-in-binary branch November 21, 2021 02:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants