diff --git a/bip-wallet-policies/wallet_policies.py b/bip-wallet-policies/wallet_policies.py index 4029569b05..42f615a2b8 100644 --- a/bip-wallet-policies/wallet_policies.py +++ b/bip-wallet-policies/wallet_policies.py @@ -56,8 +56,8 @@ def to_descriptor(self) -> str: desc = self.descriptor_template - # replace each "/**" with "/<0,1>/*" (TODO: remove if /** is not supported) - desc = desc.replace("/**", "/<0,1>/*") + # replace each "/**" with "/<0;1>/*" + desc = desc.replace("/**", "/<0;1>/*") # process all the @N expressions in decreasing order. This guarantees that string replacements # works as expected (as any prefix expression is processed after). @@ -197,4 +197,4 @@ def parse_key_expressions(only_first=False, handle_musig=False): print("======================================================\n") # Converting back to descriptors also works, as long as we take care of /** - assert wp.to_descriptor().replace("/<0,1>/*", "/**") == desc + assert wp.to_descriptor().replace("/<0;1>/*", "/**") == desc