| 130 | } |
| 131 | |
| 132 | static void UpdateWalletSetting(interfaces::Chain& chain, |
| 133 | const std::string& wallet_name, |
| 134 | std::optional<bool> load_on_startup, |
| 135 | std::vector<bilingual_str>& warnings) |
| 136 | { |
| 137 | if (!load_on_startup) return; |
| 138 | if (load_on_startup.value() && !AddWalletSetting(chain, wallet_name)) { |
| 139 | warnings.emplace_back(Untranslated("Wallet load on startup setting could not be updated, so wallet may not be loaded next node startup.")); |
| 140 | } else if (!load_on_startup.value() && !RemoveWalletSetting(chain, wallet_name)) { |
| 141 | warnings.emplace_back(Untranslated("Wallet load on startup setting could not be updated, so wallet may still be loaded next node startup.")); |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | /** |
| 146 | * Refresh mempool status so the wallet is in an internally consistent state and |
no test coverage detected