Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Vid201 committed Sep 16, 2024
1 parent 16cc59b commit b670ecc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 deletions.
34 changes: 18 additions & 16 deletions crates/metrics/src/ethers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ where
result_counter(self.inner().get_block_number().await, "silius_ethers_get_block_number")
}

async fn send_transaction<T: Into<TypedTransaction> + Send + Sync>(
&self,
async fn send_transaction<'a, T: Into<TypedTransaction> + Send + Sync>(
&'a self,
tx: T,
block: Option<BlockId>,
) -> Result<PendingTransaction<'_, Self::Provider>, Self::Error> {
) -> Result<PendingTransaction<'a, Self::Provider>, Self::Error> {
counter!("silius_ethers_send_transaction").increment(1);
result_counter(
self.inner().send_transaction(tx, block).await,
Expand Down Expand Up @@ -264,16 +264,18 @@ where
result_counter(self.inner().watch(filter).await, "silius_ethers_watch")
}

async fn watch_pending_transactions(
&self,
) -> Result<FilterWatcher<'_, Self::Provider, H256>, Self::Error> {
async fn watch_pending_transactions<'a>(
&'a self,
) -> Result<FilterWatcher<'a, Self::Provider, H256>, Self::Error> {
counter!("silius_ethers_watch_pending_transactions").increment(1);
result_counter(
self.inner().watch_pending_transactions().await,
"silius_ethers_watch_pending_transactions",
)
}
async fn watch_blocks(&self) -> Result<FilterWatcher<'_, Self::Provider, H256>, Self::Error> {
async fn watch_blocks<'a>(
&'a self,
) -> Result<FilterWatcher<'a, Self::Provider, H256>, Self::Error> {
counter!("silius_ethers_watch_blocks").increment(1);
result_counter(self.inner().watch_blocks().await, "silius_ethers_watch_blocks")
}
Expand Down Expand Up @@ -348,19 +350,19 @@ where
)
}

async fn subscribe_blocks(
&self,
) -> Result<SubscriptionStream<'_, Self::Provider, Block<H256>>, Self::Error>
async fn subscribe_blocks<'a>(
&'a self,
) -> Result<SubscriptionStream<'a, Self::Provider, Block<H256>>, Self::Error>
where
<Self as Middleware>::Provider: PubsubClient,
{
counter!("silius_ethers_subscribe_blocks").increment(1);
result_counter(self.inner().subscribe_blocks().await, "silius_ethers_subscribe_blocks")
}

async fn subscribe_pending_txs(
&self,
) -> Result<SubscriptionStream<'_, Self::Provider, H256>, Self::Error>
async fn subscribe_pending_txs<'a>(
&'a self,
) -> Result<SubscriptionStream<'a, Self::Provider, H256>, Self::Error>
where
<Self as Middleware>::Provider: PubsubClient,
{
Expand All @@ -371,9 +373,9 @@ where
)
}

async fn subscribe_full_pending_txs(
&self,
) -> Result<SubscriptionStream<'_, Self::Provider, Transaction>, Self::Error>
async fn subscribe_full_pending_txs<'a>(
&'a self,
) -> Result<SubscriptionStream<'a, Self::Provider, Transaction>, Self::Error>
where
<Self as Middleware>::Provider: PubsubClient,
{
Expand Down
8 changes: 1 addition & 7 deletions crates/primitives/src/user_operation/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,7 @@ impl From<UserOperationRequest> for UserOperationSigned {
}
},
paymaster_and_data: user_operation.paymaster_and_data,
signature: {
if let Some(signature) = user_operation.signature {
signature
} else {
Bytes::default()
}
},
signature: { user_operation.signature.unwrap_or_default() },
}
}
}
Expand Down

0 comments on commit b670ecc

Please sign in to comment.