| 91 | } |
| 92 | |
| 93 | static void UpdateWalletSetting(interfaces::Chain& chain, |
| 94 | const std::string& wallet_name, |
| 95 | std::optional<bool> load_on_startup, |
| 96 | std::vector<bilingual_str>& warnings) |
| 97 | { |
| 98 | if (!load_on_startup) return; |
| 99 | if (load_on_startup.value() && !AddWalletSetting(chain, wallet_name)) { |
| 100 | warnings.emplace_back(Untranslated("Wallet load on startup setting could not be updated, so wallet may not be loaded next node startup.")); |
| 101 | } else if (!load_on_startup.value() && !RemoveWalletSetting(chain, wallet_name)) { |
| 102 | warnings.emplace_back(Untranslated("Wallet load on startup setting could not be updated, so wallet may still be loaded next node startup.")); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * Refresh mempool status so the wallet is in an internally consistent state and |
no test coverage detected