mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
REF: better support of coldcard's incorrect 'p2sh-p2wsh'
This commit is contained in:
parent
b2b12e5191
commit
9b87901f03
@ -606,6 +606,7 @@ export class MultisigHDWallet extends AbstractHDElectrumWallet {
|
||||
this.setLegacy();
|
||||
break;
|
||||
case MultisigHDWallet.FORMAT_P2SH_P2WSH:
|
||||
case MultisigHDWallet.FORMAT_P2SH_P2WSH_ALT:
|
||||
this.setWrappedSegwit();
|
||||
break;
|
||||
default:
|
||||
|
@ -71,7 +71,7 @@ const WalletsAddMultisig = () => {
|
||||
|
||||
const isP2wsh = () => format === MultisigHDWallet.FORMAT_P2WSH;
|
||||
|
||||
const isP2shP2wsh = () => format === MultisigHDWallet.FORMAT_P2SH_P2WSH;
|
||||
const isP2shP2wsh = () => format === MultisigHDWallet.FORMAT_P2SH_P2WSH || format === MultisigHDWallet.FORMAT_P2SH_P2WSH_ALT;
|
||||
|
||||
const isP2sh = () => format === MultisigHDWallet.FORMAT_P2SH;
|
||||
|
||||
|
@ -152,6 +152,7 @@ const WalletsAddMultisigStep2 = () => {
|
||||
w.setDerivationPath(MultisigHDWallet.PATH_NATIVE_SEGWIT);
|
||||
break;
|
||||
case MultisigHDWallet.FORMAT_P2SH_P2WSH:
|
||||
case MultisigHDWallet.FORMAT_P2SH_P2WSH_ALT:
|
||||
w.setWrappedSegwit();
|
||||
w.setDerivationPath(MultisigHDWallet.PATH_WRAPPED_SEGWIT);
|
||||
break;
|
||||
@ -206,6 +207,7 @@ const WalletsAddMultisigStep2 = () => {
|
||||
path = MultisigHDWallet.PATH_NATIVE_SEGWIT;
|
||||
break;
|
||||
case MultisigHDWallet.FORMAT_P2SH_P2WSH:
|
||||
case MultisigHDWallet.FORMAT_P2SH_P2WSH_ALT:
|
||||
path = MultisigHDWallet.PATH_WRAPPED_SEGWIT;
|
||||
break;
|
||||
case MultisigHDWallet.FORMAT_P2SH:
|
||||
@ -348,6 +350,7 @@ const WalletsAddMultisigStep2 = () => {
|
||||
}
|
||||
break;
|
||||
case MultisigHDWallet.FORMAT_P2SH_P2WSH:
|
||||
case MultisigHDWallet.FORMAT_P2SH_P2WSH_ALT:
|
||||
if (cc.getPath().startsWith('m/48') && cc.getPath().endsWith("/1'")) {
|
||||
// found it
|
||||
cosigner = cc;
|
||||
@ -379,6 +382,7 @@ const WalletsAddMultisigStep2 = () => {
|
||||
}
|
||||
break;
|
||||
case MultisigHDWallet.FORMAT_P2SH_P2WSH:
|
||||
case MultisigHDWallet.FORMAT_P2SH_P2WSH_ALT:
|
||||
if (cosigner.getPath().startsWith('m/48') && cosigner.getPath().endsWith("/1'")) {
|
||||
correctFormat = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user