Skip to content

Commit 10fad78

Browse files
committed
Fix Decode response
1 parent 92a8034 commit 10fad78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rpc/src/eth.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ impl<B, C, P, CT, BE, A> EthApi<B, C, P, CT, BE, A> where
261261
storage_prefix_build(b"Ethereum", b"CurrentBlock")
262262
)
263263
) {
264-
return Decode::decode(&mut &block_data.0[..]).unwrap_or_else(|_| None);
264+
return Some(Decode::decode(&mut &block_data.0[..]).unwrap());
265265
} else { return None; };
266266
}
267267

@@ -272,7 +272,7 @@ impl<B, C, P, CT, BE, A> EthApi<B, C, P, CT, BE, A> where
272272
storage_prefix_build(b"Ethereum", b"CurrentTransactionStatuses")
273273
)
274274
) {
275-
return Decode::decode(&mut &status_data.0[..]).unwrap_or_else(|_| None);
275+
return Some(Decode::decode(&mut &status_data.0[..]).unwrap());
276276
} else { return None; };
277277
}
278278

@@ -283,7 +283,7 @@ impl<B, C, P, CT, BE, A> EthApi<B, C, P, CT, BE, A> where
283283
storage_prefix_build(b"Ethereum", b"CurrentReceipts")
284284
)
285285
) {
286-
return Decode::decode(&mut &status_data.0[..]).unwrap_or_else(|_| None);
286+
return Some(Decode::decode(&mut &status_data.0[..]).unwrap());
287287
} else { return None; };
288288
}
289289
}

0 commit comments

Comments
 (0)