Skip to content

Commit

Permalink
fix(providers): use middleware associated err type
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected committed Jan 30, 2023
1 parent 7da559b commit 6cb1936
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ethers-providers/src/lib.rs
Expand Up @@ -513,7 +513,7 @@ pub trait Middleware: Sync + Send + Debug {
&self,
private_key: Bytes,
passphrase: String,
) -> Result<Address, ProviderError> {
) -> Result<Address, Self::Error> {
self.inner().import_raw_key(private_key, passphrase).await.map_err(FromErr::from)
}

Expand All @@ -522,7 +522,7 @@ pub trait Middleware: Sync + Send + Debug {
account: T,
passphrase: String,
duration: Option<u64>,
) -> Result<bool, ProviderError> {
) -> Result<bool, Self::Error> {
self.inner().unlock_account(account, passphrase, duration).await.map_err(FromErr::from)
}

Expand Down Expand Up @@ -590,7 +590,7 @@ pub trait Middleware: Sync + Send + Debug {
&self,
tx_hash: TxHash,
trace_options: GethDebugTracingOptions,
) -> Result<GethTrace, ProviderError> {
) -> Result<GethTrace, Self::Error> {
self.inner().debug_trace_transaction(tx_hash, trace_options).await.map_err(FromErr::from)
}

Expand All @@ -600,7 +600,7 @@ pub trait Middleware: Sync + Send + Debug {
req: T,
block: Option<BlockId>,
trace_options: GethDebugTracingCallOptions,
) -> Result<GethTrace, ProviderError> {
) -> Result<GethTrace, Self::Error> {
self.inner().debug_trace_call(req, block, trace_options).await.map_err(FromErr::from)
}

Expand Down

0 comments on commit 6cb1936

Please sign in to comment.