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

Commit

Permalink
fix(wallet): bug with coldcard wallet config p2sh-p2wsh ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
humanumbrella authored and waldenraines committed Dec 17, 2020
1 parent 5d97ed3 commit f599c03
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/Coldcard/ColdcardSigner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ class ColdcardSigner extends Component {
? walletConfig.name
: `${walletConfig.name}_${startingAddressIndex.toString()}`;

// At the moment (2020-Dec), Coldcard has just released a new firmware version
// which addresses the following problem: that they inverted the ordering
// for p2sh-p2wsh as p2wsh-p2sh but we need to support the older firmware.
walletConfig.addressType = walletConfig.addressType.includes("-")
? "P2WSH-P2SH"
: walletConfig.addressType;

const interaction = ConfigAdapter({
KEYSTORE: COLDCARD,
jsonConfig: walletConfig,
Expand Down

0 comments on commit f599c03

Please sign in to comment.