Skip to content

Commit

Permalink
refactor: remove token B
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid committed Dec 13, 2023
1 parent 7008968 commit bfbe192
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/cashu/src/nuts/nut00.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ pub mod wallet {
fn from_str(s: &str) -> Result<Self, Self::Err> {
let s = if s.starts_with("cashuA") {
s.replace("cashuA", "")
} else if s.starts_with("cashuB") {
s.replace("cashuB", "")
} else {
return Err(wallet::Error::UnsupportedToken);
};
Expand All @@ -296,7 +294,7 @@ pub mod wallet {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let json_string = serde_json::to_string(self).map_err(|_| fmt::Error)?;
let encoded = general_purpose::STANDARD.encode(json_string);
write!(f, "cashuB{}", encoded)
write!(f, "cashuA{}", encoded)
}
}
}
Expand Down

0 comments on commit bfbe192

Please sign in to comment.