Permalink
Browse files

rename the Address::to_hex to Address::to_base58

  • Loading branch information...
NicolasDP committed Jan 10, 2019
1 parent 80ec884 commit 09b4d45c645a4b44e3c362014d902299652635d0
Showing with 2 additions and 2 deletions.
  1. +2 −2 cardano-wallet/src/lib.rs
@@ -273,10 +273,10 @@ impl PublicKey {
pub struct Address(address::ExtendedAddr);
#[wasm_bindgen]
impl Address {
pub fn to_hex(&self) -> String {
pub fn to_base58(&self) -> String {
format!("{}", self.0)
}
pub fn from_hex(s: &str) -> Result<Address, JsValue> {
pub fn from_base58(s: &str) -> Result<Address, JsValue> {
use std::str::FromStr;
address::ExtendedAddr::from_str(s)
.map_err(|e| JsValue::from_str(&format! {"{:?}", e}))

0 comments on commit 09b4d45

Please sign in to comment.