wallet, rpc: Use OUTPUT_TYPES to describe the output types instead of hardcoding them

This commit is contained in:
w0xlt
2025-06-18 15:39:17 -03:00
parent dff208bd5a
commit 8cc9845b8d
3 changed files with 8 additions and 2 deletions

View File

@@ -46,6 +46,11 @@ const std::string& FormatOutputType(OutputType type)
assert(false);
}
std::string FormatAllOutputTypes()
{
return util::Join(OUTPUT_TYPES, ", ", [](const auto& i) { return "\"" + FormatOutputType(i) + "\""; });
}
CTxDestination AddAndGetDestinationForScript(FlatSigningProvider& keystore, const CScript& script, OutputType type)
{
// Add script to keystore