We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3e5b5c commit 24dab7aCopy full SHA for 24dab7a
src/network.rs
@@ -168,10 +168,14 @@ impl<'a> Network<'a> {
168
.filter_map(|receipt| receipt.as_ref().ok().and_then(|receipt| receipt.clone()))
169
.collect::<Vec<_>>();
170
171
- Ok(Some(BlockWithTransactionReceipts {
172
- block: block.unwrap(), //TODO
173
- transaction_receipts: Some(transaction_receipts),
174
- }))
+ if let Some(block) = block {
+ Ok(Some(BlockWithTransactionReceipts {
+ block,
+ transaction_receipts: Some(transaction_receipts),
175
+ }))
176
+ } else {
177
+ Ok(None)
178
+ }
179
}
180
181
//TODO: use `join`
0 commit comments