Skip to content

Commit

Permalink
handle cashu prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Apr 12, 2024
1 parent 1d6c416 commit dea732d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions waila/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,11 @@ impl FromStr for PaymentParams<'_> {
return InviteCode::from_str(str)
.map(PaymentParams::FedimintInvite)
.map_err(|_| ());
} else if lower.starts_with("cashu:") {
let str = lower.strip_prefix("cashu:").unwrap();
return TokenV3::try_from(str.to_string())
.map(PaymentParams::CashuToken)
.map_err(|_| ());
}

#[cfg(feature = "rgb")]
Expand Down

0 comments on commit dea732d

Please sign in to comment.