fix(providers): use middleware associated err type (#2093)

This commit is contained in:
Dan Cline 2023-01-30 14:57:03 -05:00 committed by GitHub
parent 7da559bbed
commit 08514ea986
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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)
}
@ -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)
}
@ -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)
}
@ -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)
}