mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge pull request #1294 from psgreco/master-liquid-wallet-descr
Remove constrains on liquidv1 pegout bitcoin descriptor
This commit is contained in:
commit
2d298f7e3f
1 changed files with 0 additions and 7 deletions
|
|
@ -361,18 +361,11 @@ RPCHelpMan initpegoutwallet()
|
|||
}
|
||||
|
||||
// Three acceptable descriptors:
|
||||
bool is_liquid = Params().NetworkIDString() == "liquidv1";
|
||||
if (bitcoin_desc.substr(0, 8) == "sh(wpkh("
|
||||
&& bitcoin_desc.substr(bitcoin_desc.size()-2, 2) == "))") {
|
||||
if(is_liquid) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "bitcoin_descriptor is not supported by Liquid; try pkh(<xpub>) or <xpub>.");
|
||||
}
|
||||
xpub_str = bitcoin_desc.substr(8, bitcoin_desc.size()-2);
|
||||
} else if (bitcoin_desc.substr(0, 5) == "wpkh("
|
||||
&& bitcoin_desc.substr(bitcoin_desc.size()-1, 1) == ")") {
|
||||
if(is_liquid) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "bitcoin_descriptor is not supported by Liquid; try pkh(<xpub>) or <xpub>.");
|
||||
}
|
||||
xpub_str = bitcoin_desc.substr(5, bitcoin_desc.size()-1);
|
||||
} else if (bitcoin_desc.substr(0, 4) == "pkh("
|
||||
&& bitcoin_desc.substr(bitcoin_desc.size()-1, 1) == ")") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue