Switch to using ss58-registry crate (#9755)

* Switch to using ss58-registry crate
* Custom(42) is now eq to Substrate

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2021-10-12 09:54:40 +01:00
1 parent 8f8b08871f
commit 98c157886c
7 files changed
+74 -304

No files matched your search

@@ -22,7 +22,7 @@ use sc_cli::{
utils::print_from_uri, with_crypto_scheme, CryptoSchemeFlag, Error, KeystoreParams,
OutputTypeFlag,
};
use sp_core::crypto::{Ss58AddressFormat, Ss58Codec};
use sp_core::crypto::{unwrap_or_default_ss58_version, Ss58AddressFormat, Ss58Codec};
use sp_runtime::traits::AccountIdConversion;
use std::convert::{TryFrom, TryInto};
use structopt::StructOpt;
@@ -78,7 +78,7 @@ impl PalletIdCmd {
with_crypto_scheme!(
self.crypto_scheme.scheme,
print_from_uri(
&account_id.to_ss58check_with_version(self.network.clone().unwrap_or_default()),
&account_id.to_ss58check_with_version(unwrap_or_default_ss58_version(self.network)),
password,
self.network,
self.output_scheme.output_type.clone()