Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kuegi committed Jun 14, 2023
1 parent 3901a5c commit 3183d2b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions lib/ain-grpc/src/transaction_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ impl From<TransactionRequest> for Option<TransactionMessage> {
gas_price: req.gas_price.unwrap_or_default(),
gas_limit: req.gas.unwrap_or_default(),
value: req.value.unwrap_or_default(),
input: req.input.map(Bytes::into_vec)
.unwrap_or(req.data.map(Bytes::into_vec).unwrap_or_default()),
input: req
.input
.map(Bytes::into_vec)
.unwrap_or(req.data.map(Bytes::into_vec).unwrap_or_default()),
action: match req.to {
Some(to) => ethereum::TransactionAction::Call(to),
None => ethereum::TransactionAction::Create,
Expand All @@ -70,8 +72,10 @@ impl From<TransactionRequest> for Option<TransactionMessage> {
gas_price: req.gas_price.unwrap_or_default(),
gas_limit: req.gas.unwrap_or_default(),
value: req.value.unwrap_or_default(),
input: req.input.map(Bytes::into_vec)
.unwrap_or(req.data.map(Bytes::into_vec).unwrap_or_default()),
input: req
.input
.map(Bytes::into_vec)
.unwrap_or(req.data.map(Bytes::into_vec).unwrap_or_default()),
action: match req.to {
Some(to) => ethereum::TransactionAction::Call(to),
None => ethereum::TransactionAction::Create,
Expand All @@ -88,8 +92,10 @@ impl From<TransactionRequest> for Option<TransactionMessage> {
max_priority_fee_per_gas: req.max_priority_fee_per_gas.unwrap_or_default(),
gas_limit: req.gas.unwrap_or_default(),
value: req.value.unwrap_or_default(),
input: req.input.map(Bytes::into_vec)
.unwrap_or(req.data.map(Bytes::into_vec).unwrap_or_default()),
input: req
.input
.map(Bytes::into_vec)
.unwrap_or(req.data.map(Bytes::into_vec).unwrap_or_default()),
action: match req.to {
Some(to) => ethereum::TransactionAction::Call(to),
None => ethereum::TransactionAction::Create,
Expand Down

0 comments on commit 3183d2b

Please sign in to comment.