fix(providers): use middleware associated err type (#2093)
This commit is contained in:
parent
7da559bbed
commit
08514ea986
|
@ -513,7 +513,7 @@ pub trait Middleware: Sync + Send + Debug {
|
||||||
&self,
|
&self,
|
||||||
private_key: Bytes,
|
private_key: Bytes,
|
||||||
passphrase: String,
|
passphrase: String,
|
||||||
) -> Result<Address, ProviderError> {
|
) -> Result<Address, Self::Error> {
|
||||||
self.inner().import_raw_key(private_key, passphrase).await.map_err(FromErr::from)
|
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,
|
account: T,
|
||||||
passphrase: String,
|
passphrase: String,
|
||||||
duration: Option<u64>,
|
duration: Option<u64>,
|
||||||
) -> Result<bool, ProviderError> {
|
) -> Result<bool, Self::Error> {
|
||||||
self.inner().unlock_account(account, passphrase, duration).await.map_err(FromErr::from)
|
self.inner().unlock_account(account, passphrase, duration).await.map_err(FromErr::from)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -590,7 +590,7 @@ pub trait Middleware: Sync + Send + Debug {
|
||||||
&self,
|
&self,
|
||||||
tx_hash: TxHash,
|
tx_hash: TxHash,
|
||||||
trace_options: GethDebugTracingOptions,
|
trace_options: GethDebugTracingOptions,
|
||||||
) -> Result<GethTrace, ProviderError> {
|
) -> Result<GethTrace, Self::Error> {
|
||||||
self.inner().debug_trace_transaction(tx_hash, trace_options).await.map_err(FromErr::from)
|
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,
|
req: T,
|
||||||
block: Option<BlockId>,
|
block: Option<BlockId>,
|
||||||
trace_options: GethDebugTracingCallOptions,
|
trace_options: GethDebugTracingCallOptions,
|
||||||
) -> Result<GethTrace, ProviderError> {
|
) -> Result<GethTrace, Self::Error> {
|
||||||
self.inner().debug_trace_call(req, block, trace_options).await.map_err(FromErr::from)
|
self.inner().debug_trace_call(req, block, trace_options).await.map_err(FromErr::from)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue