mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 10:17:57 +00:00
rpc: add rpc v2 chainSpec to polkadot (#2859)
The [chainSpec RPC API from the v2 spec](https://paritytech.github.io/json-rpc-interface-spec/api/chainSpec.html) was only added to substrate-node and should be added to polkadot as well /cc @lexnv
This commit is contained in:
@@ -434,7 +434,7 @@ impl<T: Sized + AsMut<[u8]> + AsRef<[u8]> + Public + Derive> Ss58Codec for T {
|
||||
fn from_string(s: &str) -> Result<Self, PublicError> {
|
||||
let cap = AddressUri::parse(s)?;
|
||||
if cap.pass.is_some() {
|
||||
return Err(PublicError::PasswordNotAllowed);
|
||||
return Err(PublicError::PasswordNotAllowed)
|
||||
}
|
||||
let s = cap.phrase.unwrap_or(DEV_ADDRESS);
|
||||
let addr = if let Some(stripped) = s.strip_prefix("0x") {
|
||||
@@ -454,7 +454,7 @@ impl<T: Sized + AsMut<[u8]> + AsRef<[u8]> + Public + Derive> Ss58Codec for T {
|
||||
fn from_string_with_version(s: &str) -> Result<(Self, Ss58AddressFormat), PublicError> {
|
||||
let cap = AddressUri::parse(s)?;
|
||||
if cap.pass.is_some() {
|
||||
return Err(PublicError::PasswordNotAllowed);
|
||||
return Err(PublicError::PasswordNotAllowed)
|
||||
}
|
||||
let (addr, v) = Self::from_ss58check_with_version(cap.phrase.unwrap_or(DEV_ADDRESS))?;
|
||||
if cap.paths.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user