core, subkey: allow to read Polkadot, Kusama, and Dothereum address types (#3643)

* core/primitives: set dothereum address type to 4

* subkey: add dothereum to network prefix

* core/primitives: set dothereum address type to 20

* core/primitives: update comment

* core/primitives: set default address to Dothereum

* Revert "core/primitives: set default address to Dothereum"

This reverts commit 2fc95490c89390eb26f200cb314435b1e9ff83e8.

* core/primitives: allow to parse different default address types
This commit is contained in:
Talha Cross
2019-09-19 08:34:41 +02:00
committed by GitHub
parent 9ea3d8fc52
commit 5585770a12
3 changed files with 17 additions and 4 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ args:
long: network
takes_value: true
required: false
help: Specify a network. One of substrate (default), polkadot and kusama.
help: Specify a network. One of substrate (default), polkadot, kusama, or dothereum.
subcommands:
- generate:
about: Generate a random account
+2 -2
View File
@@ -140,7 +140,7 @@ where
let maybe_network: Option<Ss58AddressFormat> = matches.value_of("network").map(|network| {
network
.try_into()
.expect("Invalid network name: must be polkadot/substrate/kusama")
.expect("Invalid network name: must be polkadot/substrate/kusama/dothereum")
});
if let Some(network) = maybe_network {
set_default_ss58_version(network);
@@ -382,7 +382,7 @@ fn create_extrinsic(
);
let signature = raw_payload.using_encoded(|payload| signer.sign(payload));
let (function, extra, _) = raw_payload.deconstruct();
UncheckedExtrinsic::new_signed(
function,
signer.public().into(),