Skip to content

Commit

Permalink
fix nit
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasad1 committed Oct 31, 2024
1 parent 3189731 commit a0aec2c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions subxt/examples/substrate_compat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ pub mod polkadot {}

pub enum PolkadotConfig {}

impl subxt::Config for PolkadotConfig {
type Hash = <subxt::PolkadotConfig as Config>::Hash;
type AccountId = AccountId32;
type Address = MultiAddress<Self::AccountId, ()>;
type Signature = MultiSignature;
type Hasher = <subxt::PolkadotConfig as Config>::Hasher;
type Header = <subxt::PolkadotConfig as Config>::Header;
type ExtrinsicParams = PolkadotExtrinsicParams<Self>;
type AssetId = u32;
}

/// AccountId32 for substrate compatibility.
#[derive(
Clone,
Expand Down Expand Up @@ -103,17 +114,6 @@ impl From<sp_core::ecdsa::Signature> for MultiSignature {
}
}

impl subxt::Config for PolkadotConfig {
type Hash = <subxt::PolkadotConfig as Config>::Hash;
type AccountId = AccountId32;
type Address = MultiAddress<Self::AccountId, ()>;
type Signature = MultiSignature;
type Hasher = <subxt::PolkadotConfig as Config>::Hasher;
type Header = <subxt::PolkadotConfig as Config>::Header;
type ExtrinsicParams = PolkadotExtrinsicParams<Self>;
type AssetId = u32;
}

/// A [`Signer`] implementation that can be constructed from an [`sp_core::Pair`].
#[derive(Clone, Debug)]
pub struct PairSigner<T: Config, Pair> {
Expand Down

0 comments on commit a0aec2c

Please sign in to comment.