@@ -103,25 +103,25 @@ static void WalletShowInfo(CWallet* wallet_instance)
103103 tfm::format (std::cout, " Address Book: %zu\n " , wallet_instance->m_address_book .size ());
104104}
105105
106- bool ExecuteWalletToolFunc (const std::string& command, const std::string& name)
106+ bool ExecuteWalletToolFunc (const ArgsManager& args, const std::string& command, const std::string& name)
107107{
108108 fs::path path = fs::absolute (name, GetWalletDir ());
109109
110110 // -format is only allowed with createfromdump. Disallow it for all other commands.
111- if (gArgs .IsArgSet (" -format" ) && command != " createfromdump" ) {
111+ if (args .IsArgSet (" -format" ) && command != " createfromdump" ) {
112112 tfm::format (std::cerr, " The -format option can only be used with the \" createfromdump\" command.\n " );
113113 return false ;
114114 }
115115 // -dumpfile is only allowed with dump and createfromdump. Disallow it for all other commands.
116- if (gArgs .IsArgSet (" -dumpfile" ) && command != " dump" && command != " createfromdump" ) {
116+ if (args .IsArgSet (" -dumpfile" ) && command != " dump" && command != " createfromdump" ) {
117117 tfm::format (std::cerr, " The -dumpfile option can only be used with the \" dump\" and \" createfromdump\" commands.\n " );
118118 return false ;
119119 }
120120
121121 if (command == " create" ) {
122122 DatabaseOptions options;
123123 options.require_create = true ;
124- if (gArgs .GetBoolArg (" -descriptors" , false )) {
124+ if (args .GetBoolArg (" -descriptors" , false )) {
125125 options.create_flags |= WALLET_FLAG_DESCRIPTORS;
126126 options.require_format = DatabaseFormat::SQLITE;
127127 }
0 commit comments