diff --git a/starknet-accounts/src/account/mod.rs b/starknet-accounts/src/account/mod.rs index fb257687..599929e6 100644 --- a/starknet-accounts/src/account/mod.rs +++ b/starknet-accounts/src/account/mod.rs @@ -312,6 +312,8 @@ where } } +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] impl ConnectedAccount for &A where A: ConnectedAccount + Sync, @@ -321,8 +323,18 @@ where fn provider(&self) -> &Self::Provider { (*self).provider() } + + fn block_id(&self) -> BlockId { + (*self).block_id() + } + + async fn get_nonce(&self) -> Result { + (*self).get_nonce().await + } } +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] impl ConnectedAccount for Box where A: ConnectedAccount + Sync + Send, @@ -332,8 +344,18 @@ where fn provider(&self) -> &Self::Provider { self.as_ref().provider() } + + fn block_id(&self) -> BlockId { + self.as_ref().block_id() + } + + async fn get_nonce(&self) -> Result { + self.as_ref().get_nonce().await + } } +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] impl ConnectedAccount for Arc where A: ConnectedAccount + Sync + Send, @@ -343,4 +365,12 @@ where fn provider(&self) -> &Self::Provider { self.as_ref().provider() } + + fn block_id(&self) -> BlockId { + self.as_ref().block_id() + } + + async fn get_nonce(&self) -> Result { + self.as_ref().get_nonce().await + } }