let call_result = self
.0
.as_mut()
- .unwrap()
+ .ok_or(Error::OfflineClient)?
.batch_script_get_history(chunk.iter())?;
for (script, history) in chunk.into_iter().zip(call_result.into_iter()) {
let call_result = self
.0
.as_mut()
- .unwrap()
+ .ok_or(Error::OfflineClient)?
.batch_script_list_unspent(scripts)?;
// check which utxos are actually still unspent
Ok(self
.0
.as_mut()
- .unwrap()
+ .ok_or(Error::OfflineClient)?
.transaction_get(txid)
.map(Option::Some)?)
}
Ok(self
.0
.as_mut()
- .unwrap()
+ .ok_or(Error::OfflineClient)?
.transaction_broadcast(tx)
.map(|_| ())?)
}
Ok(self
.0
.as_mut()
- .unwrap()
+ .ok_or(Error::OfflineClient)?
.block_headers_subscribe()
.map(|data| data.height)?)
}
// went wrong
saved_tx.transaction.unwrap()
}
- None => self.0.as_mut().unwrap().transaction_get(&txid)?,
+ None => self
+ .0
+ .as_mut()
+ .ok_or(Error::OfflineClient)?
+ .transaction_get(&txid)?,
};
let mut incoming: u64 = 0;
// Blockchain interface errors
Uncapable(crate::blockchain::Capability),
+ OfflineClient,
InvalidProgressValue(f32),
ProgressUpdateError,
MissingCachedAddresses,