Skip to content

Commit

Permalink
Address review grumbles from #99
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdplm committed Sep 22, 2020
1 parent f9f69b8 commit f89e951
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ keywords = ["parity", "substrate", "blockchain"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[features]
kusama = []
default = ["kusama"]
default = []
client = ["substrate-subxt-client"]

# enable this feature to run tests which require a local dev chain node
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ A library to **sub**mit e**xt**rinsics to a [substrate](https://github.com/parit

See [examples](./examples).

If you use `#[derive(Call)]` without `#[module]` in the same module, you will get errors
complaining about an undefined method with a name starting with `with_`.

**Alternatives**

[substrate-api-client](https://github.com/scs/substrate-api-client) provides similar functionality.
Expand Down
4 changes: 4 additions & 0 deletions proc-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ decl_derive!(
///
/// Under the hood the implementation calls [submit()](../substrate_subxt/struct.Client.html#method.submit) and
/// [watch()](../substrate_subxt/struct.Client.html#method.watch) respectively.
///
/// *N.B.* You must use the `#[derive(Call)]` macro with `#[module]` in the same module or you will get errors
/// about undefined method with a name starting with `with_`.
#[proc_macro_error] call
);
fn call(s: Structure) -> TokenStream {
Expand Down
3 changes: 0 additions & 3 deletions src/frame/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ pub trait System {
type AccountId: Parameter
+ Member
+ MaybeSerialize
+ Debug
+ MaybeDisplay
+ Encode
+ Decode
+ Ord
+ Default;

Expand Down
3 changes: 0 additions & 3 deletions src/runtimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ impl sp_runtime::BoundToRuntimeAppPublic for Grandpa {

use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;

#[cfg(feature = "kusama")]
mod validator_app {
use application_crypto::{
app_crypto,
Expand All @@ -62,11 +61,9 @@ mod validator_app {
}

/// Parachain marker struct
#[cfg(feature = "kusama")]
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct Parachains;

#[cfg(feature = "kusama")]
impl sp_runtime::BoundToRuntimeAppPublic for Parachains {
type Public = validator_app::Public;
}
Expand Down

0 comments on commit f89e951

Please sign in to comment.