Skip to content

Commit

Permalink
Fix Decode response
Browse files Browse the repository at this point in the history
  • Loading branch information
tgmichel committed Oct 19, 2020
1 parent 92a8034 commit 10fad78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rpc/src/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ impl<B, C, P, CT, BE, A> EthApi<B, C, P, CT, BE, A> where
storage_prefix_build(b"Ethereum", b"CurrentBlock")
)
) {
return Decode::decode(&mut &block_data.0[..]).unwrap_or_else(|_| None);
return Some(Decode::decode(&mut &block_data.0[..]).unwrap());
} else { return None; };
}

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

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

0 comments on commit 10fad78

Please sign in to comment.