MCPcopy Create free account
hub / github.com/ElementsProject/elements / RemoveWalletSetting

Function RemoveWalletSetting

src/wallet/wallet.cpp:81–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81bool RemoveWalletSetting(interfaces::Chain& chain, const std::string& wallet_name)
82{
83 util::SettingsValue setting_value = chain.getRwSetting("wallet");
84 if (!setting_value.isArray()) return true;
85 util::SettingsValue new_value(util::SettingsValue::VARR);
86 for (const util::SettingsValue& value : setting_value.getValues()) {
87 if (!value.isStr() || value.get_str() != wallet_name) new_value.push_back(value);
88 }
89 if (new_value.size() == setting_value.size()) return true;
90 return chain.updateRwSetting("wallet", new_value);
91}
92
93static void UpdateWalletSetting(interfaces::Chain& chain,
94 const std::string& wallet_name,

Callers 1

UpdateWalletSettingFunction · 0.85

Calls 6

getRwSettingMethod · 0.80
isArrayMethod · 0.80
isStrMethod · 0.80
updateRwSettingMethod · 0.80
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected