Skip to content

Commit

Permalink
Rename SS58Address::from_str to SS58Address::parse
Browse files Browse the repository at this point in the history
  • Loading branch information
doom committed May 31, 2024
1 parent adf5906 commit 0c734ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust/chains/tw_polkadot/src/extrinsic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::collections::HashMap;
use std::iter::{repeat, Iterator};
use std::str::FromStr;

use lazy_static::lazy_static;

Expand All @@ -22,7 +23,6 @@ use tw_proto::Polkadot::Proto::mod_Staking::{
use tw_proto::Polkadot::Proto::{Balance, PolymeshCall, Staking};
use tw_ss58_address::{NetworkId, SS58Address};

use crate::address::PolkadotAddress;
use crate::scale::{Compact, ToScale};

const POLKADOT_MULTI_ADDRESS_SPEC: u32 = 28;
Expand Down
4 changes: 2 additions & 2 deletions rust/tw_ss58_address/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl SS58Address {
bytes
}

pub fn from_str(repr: &str) -> AddressResult<Self> {
pub fn parse(repr: &str) -> AddressResult<Self> {
let decoded = base58::decode(repr, base58::Alphabet::BITCOIN)
.map_err(|_| AddressError::FromBase58Error)?;

Expand Down Expand Up @@ -173,7 +173,7 @@ impl FromStr for SS58Address {
type Err = AddressError;

fn from_str(s: &str) -> Result<Self, Self::Err> {
Self::from_str(s)
Self::parse(s)
}
}

Expand Down

0 comments on commit 0c734ad

Please sign in to comment.