Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Blocked] Update TransactionRequest's to field to TxKind #553

Merged
merged 20 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint: clippy
  • Loading branch information
prestwich committed Apr 18, 2024
commit 554e7cccd0af164da055ff894d783a82cd39ebd7
2 changes: 1 addition & 1 deletion crates/network/src/transaction/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub trait TransactionBuilder<N: Network>: Default + Sized + Send + Sync + 'stati
}

/// Set the `to` field to a create call.
fn as_create(mut self) -> Self {
fn into_create(mut self) -> Self {
self.set_create();
self
}
Expand Down
5 changes: 1 addition & 4 deletions crates/rpc-types/src/eth/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,7 @@ impl Transaction {
(None, None) => None,
};

let to = match self.to {
Some(to_address) => Some(TxKind::Call(to_address)),
None => None,
};
let to = self.to.map(TxKind::Call);

TransactionRequest {
from: Some(self.from),
Expand Down
Loading