| 11 | |
| 12 | namespace wallet { |
| 13 | fs::path GetWalletDir() |
| 14 | { |
| 15 | fs::path path; |
| 16 | |
| 17 | if (gArgs.IsArgSet("-walletdir")) { |
| 18 | path = gArgs.GetPathArg("-walletdir"); |
| 19 | if (!fs::is_directory(path)) { |
| 20 | // If the path specified doesn't exist, we return the deliberately |
| 21 | // invalid empty string. |
| 22 | path = ""; |
| 23 | } |
| 24 | } else { |
| 25 | path = gArgs.GetDataDirNet(); |
| 26 | // If a wallets directory exists, use that, otherwise default to GetDataDir |
| 27 | if (fs::is_directory(path / "wallets")) { |
| 28 | path /= "wallets"; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | return path; |
| 33 | } |
| 34 | |
| 35 | WalletDescriptor GenerateWalletDescriptor(const CExtPubKey& master_key, const OutputType& addr_type, bool internal) |
| 36 | { |
no test coverage detected