mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-22 09:09:07 -05:00
fix typo in relay information about payments url
This commit is contained in:
parent
9a471fee25
commit
b522f9ed0a
10
src/info.rs
10
src/info.rs
|
@ -55,7 +55,7 @@ pub struct RelayInfo {
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub limitation: Option<Limitation>,
|
pub limitation: Option<Limitation>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub payment_url: Option<String>,
|
pub payments_url: Option<String>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub fees: Option<Fees>,
|
pub fees: Option<Fees>,
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ impl From<Settings> for RelayInfo {
|
||||||
payment_required: Some(p.enabled),
|
payment_required: Some(p.enabled),
|
||||||
};
|
};
|
||||||
|
|
||||||
let (payment_url, fees) = if p.enabled {
|
let (payments_url, fees) = if p.enabled {
|
||||||
let admission_fee = if p.admission_cost > 0 {
|
let admission_fee = if p.admission_cost > 0 {
|
||||||
Some(vec![Fee {
|
Some(vec![Fee {
|
||||||
amount: p.admission_cost * 1000,
|
amount: p.admission_cost * 1000,
|
||||||
|
@ -101,7 +101,7 @@ impl From<Settings> for RelayInfo {
|
||||||
publication: post_fee,
|
publication: post_fee,
|
||||||
};
|
};
|
||||||
|
|
||||||
let payment_url = if p.enabled && i.relay_url.is_some() {
|
let payments_url = if p.enabled && i.relay_url.is_some() {
|
||||||
Some(format!(
|
Some(format!(
|
||||||
"{}join",
|
"{}join",
|
||||||
i.relay_url.clone().unwrap().replace("ws", "http")
|
i.relay_url.clone().unwrap().replace("ws", "http")
|
||||||
|
@ -109,7 +109,7 @@ impl From<Settings> for RelayInfo {
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
(payment_url, Some(fees))
|
(payments_url, Some(fees))
|
||||||
} else {
|
} else {
|
||||||
(None, None)
|
(None, None)
|
||||||
};
|
};
|
||||||
|
@ -124,7 +124,7 @@ impl From<Settings> for RelayInfo {
|
||||||
software: Some("https://github.com/mroxso/nostr-rs-relay".to_owned()),
|
software: Some("https://github.com/mroxso/nostr-rs-relay".to_owned()),
|
||||||
version: CARGO_PKG_VERSION.map(std::borrow::ToOwned::to_owned),
|
version: CARGO_PKG_VERSION.map(std::borrow::ToOwned::to_owned),
|
||||||
limitation: Some(limitations),
|
limitation: Some(limitations),
|
||||||
payment_url,
|
payments_url,
|
||||||
fees,
|
fees,
|
||||||
icon: i.relay_icon,
|
icon: i.relay_icon,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user