Skip to content

Commit

Permalink
Remove unnecessary Sync requirements
Browse files Browse the repository at this point in the history
This is needed for Ledgeracio, as Ledgeracio’s signer is now no longer
`Send`.
  • Loading branch information
DemiMarie authored and Demi-Marie committed Sep 24, 2020
1 parent 385d214 commit 92f1e87
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/extrinsic/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub trait Signer<T: Runtime> {
fn sign(
&self,
extrinsic: SignedPayload<T>,
) -> Pin<Box<dyn Future<Output = Result<UncheckedExtrinsic<T>, String>> + Send + Sync>>;
) -> Pin<Box<dyn Future<Output = Result<UncheckedExtrinsic<T>, String>> + Send>>;
}

/// Extrinsic signer using a private key.
Expand Down Expand Up @@ -100,8 +100,7 @@ impl<T, P> Signer<T> for PairSigner<T, P>
where
T: Runtime,
T::AccountId: Into<T::Address> + 'static,
<<T::Extra as SignedExtra<T>>::Extra as SignedExtension>::AdditionalSigned:
Send + Sync,
<<T::Extra as SignedExtra<T>>::Extra as SignedExtension>::AdditionalSigned: Send,
P: Pair + 'static,
P::Signature: Into<T::Signature> + 'static,
{
Expand All @@ -116,8 +115,7 @@ where
fn sign(
&self,
extrinsic: SignedPayload<T>,
) -> Pin<Box<dyn Future<Output = Result<UncheckedExtrinsic<T>, String>> + Send + Sync>>
{
) -> Pin<Box<dyn Future<Output = Result<UncheckedExtrinsic<T>, String>> + Send>> {
let signature = extrinsic.using_encoded(|payload| self.signer.sign(payload));
let (call, extra, _) = extrinsic.deconstruct();
let extrinsic = UncheckedExtrinsic::<T>::new_signed(
Expand Down

0 comments on commit 92f1e87

Please sign in to comment.