bitcoind: do not assert presence of 'warning' field in unloadwallet response
This commit is contained in:
parent
08223c0ded
commit
3a82c3a81d
@ -449,8 +449,7 @@ impl BitcoinD {
|
||||
pub fn unload_wallet(&self, wallet_path: String) -> Option<String> {
|
||||
self.make_node_request("unloadwallet", ¶ms!(Json::String(wallet_path),))
|
||||
.get("warning")
|
||||
.expect("No 'warning' in 'unloadwallet' response?")
|
||||
.as_str()
|
||||
.and_then(Json::as_str)
|
||||
.and_then(|w| {
|
||||
if w.is_empty() {
|
||||
None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user