Skip to content

Commit 240ac97

Browse files
committed
chores
1 parent e60ca70 commit 240ac97

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

api/src/common/send.rs

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ impl ExecuteSignedTransaction {
288288
);
289289

290290
let wait_until = match params {
291-
RpcTransactionStatusRequest::Variant0 { wait_until, .. } => wait_until,
292-
RpcTransactionStatusRequest::Variant1 { wait_until, .. } => wait_until,
291+
RpcTransactionStatusRequest::Variant0 { wait_until, .. }
292+
| RpcTransactionStatusRequest::Variant1 { wait_until, .. } => wait_until,
293293
};
294294

295295
let result = retry(network.clone(), |client| {
@@ -348,7 +348,7 @@ impl ExecuteSignedTransaction {
348348
info!(
349349
target: TX_EXECUTOR_TARGET,
350350
"Broadcasting signed transaction. Hash: {:?}, Signer: {:?}, Receiver: {:?}, Nonce: {}",
351-
signed_tr.get_hash(),
351+
signed_tr.get_hash().to_string(),
352352
signed_tr.transaction.signer_id(),
353353
signed_tr.transaction.receiver_id(),
354354
signed_tr.transaction.nonce(),
@@ -381,7 +381,7 @@ impl ExecuteSignedTransaction {
381381
tracing::debug!(
382382
target: TX_EXECUTOR_TARGET,
383383
"Broadcasting transaction {} resulted in {:?}",
384-
hash,
384+
hash.to_string(),
385385
result
386386
);
387387

@@ -427,7 +427,7 @@ impl ExecuteMetaTransaction {
427427
self
428428
}
429429

430-
pub fn get_tx_lifetime(&self) -> BlockHeight {
430+
pub fn get_tx_lifetime_delta(&self) -> BlockHeight {
431431
self.tx_live_for
432432
.unwrap_or(META_TRANSACTION_VALID_FOR_DEFAULT)
433433
}
@@ -452,7 +452,7 @@ impl ExecuteMetaTransaction {
452452
};
453453

454454
let transaction = transaction.prepopulated()?;
455-
let max_block_height = block_height + self.get_tx_lifetime();
455+
let max_block_height = block_height + self.get_tx_lifetime_delta();
456456

457457
let signed_tr = self
458458
.signer
@@ -555,7 +555,7 @@ impl ExecuteMetaTransaction {
555555
prepopulated.signer_id.clone(),
556556
network,
557557
prepopulated,
558-
self.get_tx_lifetime(),
558+
self.get_tx_lifetime_delta(),
559559
)
560560
.await
561561
}
@@ -704,13 +704,8 @@ fn into_final_outcome(response: SendImplResponse) -> TxExecutionResult {
704704
status,
705705
transaction,
706706
transaction_outcome,
707-
} => FinalExecutionOutcomeView {
708-
receipts_outcome,
709-
status,
710-
transaction,
711-
transaction_outcome,
712-
},
713-
RpcTransactionResponse::Variant1 {
707+
}
708+
| RpcTransactionResponse::Variant1 {
714709
final_execution_status: _,
715710
receipts_outcome,
716711
status,

types/src/transaction/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl TryFrom<near_openapi_types::SignedTransactionView> for SignedTransaction {
140140
public_key: public_key.try_into()?,
141141
nonce,
142142
receiver_id,
143-
// FIXME: this is tx hash, not block hash (https://github.com/near/nearcore/blob/master/core/primitives/src/views.rs#L1644)
143+
// FIXME: this is tx hash, not block hash (https://github.com/near/near-api-rs/issues/134)
144144
block_hash: hash.into(),
145145
actions: actions
146146
.into_iter()
@@ -154,7 +154,7 @@ impl TryFrom<near_openapi_types::SignedTransactionView> for SignedTransaction {
154154
public_key: public_key.try_into()?,
155155
nonce,
156156
receiver_id,
157-
// FIXME: this is tx hash, not block hash (https://github.com/near/nearcore/blob/master/core/primitives/src/views.rs#L1644)
157+
// FIXME: this is tx hash, not block hash (https://github.com/near/near-api-rs/issues/134)
158158
block_hash: hash.into(),
159159
actions: actions
160160
.into_iter()

0 commit comments

Comments
 (0)