Skip to content

Commit 13e8cc8

Browse files
committed
Bump upstream deps to ce2ba11a
Signed-off-by: Yuki Kishimoto <[email protected]>
1 parent 2d0e888 commit 13e8cc8

File tree

9 files changed

+33
-24
lines changed

9 files changed

+33
-24
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
2626
-->
2727

28+
## Unreleased
29+
30+
## Changed
31+
32+
* Bump upstream deps to ce2ba11a
33+
2834
## 0.40.2
2935

3036
### Fixed

Cargo.lock

Lines changed: 8 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ crate-type = ["cdylib"]
1010
[dependencies]
1111
console_error_panic_hook = "0.1"
1212
js-sys = "0.3"
13-
nostr-connect = "0.40"
14-
nostr-sdk = { version = "0.40", default-features = false, features = ["all-nips", "indexeddb"] }
15-
nwc = "0.40"
13+
nostr-connect = { git = "https://github.com/rust-nostr/nostr", rev = "ce2ba11ab4ed94d2ac9f5eb16f0340a76ae12d54" }
14+
nostr-sdk = { git = "https://github.com/rust-nostr/nostr", rev = "ce2ba11ab4ed94d2ac9f5eb16f0340a76ae12d54", default-features = false, features = ["all-nips", "indexeddb"] }
15+
nwc = { git = "https://github.com/rust-nostr/nostr", rev = "ce2ba11ab4ed94d2ac9f5eb16f0340a76ae12d54" }
1616
tracing = "0.1"
1717
tracing-subscriber = "0.3"
1818
wasm-bindgen = { version = "0.2", features = ["std"] }

src/policy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl From<JsAdmitStatus> for AdmitStatus {
1919
fn from(status: JsAdmitStatus) -> Self {
2020
match status {
2121
JsAdmitStatus::Success => Self::Success,
22-
JsAdmitStatus::Rejected => Self::Rejected,
22+
JsAdmitStatus::Rejected => Self::Rejected { reason: None },
2323
}
2424
}
2525
}

src/protocol/event/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -848,9 +848,9 @@ impl JsEventBuilder {
848848
///
849849
/// <https://github.com/nostr-protocol/nips/blob/master/32.md>
850850
#[wasm_bindgen]
851-
pub fn label(label_namespace: &str, labels: Vec<String>) -> Self {
851+
pub fn label(label_namespace: &str, label: String) -> Self {
852852
Self {
853-
inner: EventBuilder::label(label_namespace, labels),
853+
inner: EventBuilder::label(label_namespace, label),
854854
}
855855
}
856856

src/protocol/event/kind.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ pub enum JsKindStandard {
349349
///
350350
/// <https://github.com/nostr-protocol/nips/blob/master/60.md>
351351
CashuWalletSpendingHistory,
352+
/// Code Snippet
353+
///
354+
/// <https://github.com/nostr-protocol/nips/blob/master/C0.md>
355+
CodeSnippet,
352356
}
353357

354358
fn convert(k: Kind) -> Option<JsKindStandard> {
@@ -438,6 +442,7 @@ fn convert(k: Kind) -> Option<JsKindStandard> {
438442
Kind::CashuWallet => Some(JsKindStandard::CashuWallet),
439443
Kind::CashuWalletUnspentProof => Some(JsKindStandard::CashuWalletUnspentProof),
440444
Kind::CashuWalletSpendingHistory => Some(JsKindStandard::CashuWalletSpendingHistory),
445+
Kind::CodeSnippet => Some(JsKindStandard::CodeSnippet),
441446
Kind::Custom(..) => None,
442447
}
443448
}
@@ -524,6 +529,7 @@ impl From<JsKindStandard> for Kind {
524529
JsKindStandard::CashuWallet => Self::CashuWallet,
525530
JsKindStandard::CashuWalletUnspentProof => Self::CashuWalletUnspentProof,
526531
JsKindStandard::CashuWalletSpendingHistory => Self::CashuWalletSpendingHistory,
532+
JsKindStandard::CodeSnippet => Self::CodeSnippet,
527533
}
528534
}
529535
}

src/protocol/event/tag/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@ impl JsTag {
124124
///
125125
/// <https://github.com/nostr-protocol/nips/blob/master/01.md>
126126
#[inline]
127-
pub fn coordinate(coordinate: &JsCoordinate) -> Self {
127+
pub fn coordinate(coordinate: &JsCoordinate, relay_url: Option<String>) -> Self {
128+
let relay_url: Option<RelayUrl> = relay_url.and_then(|url| RelayUrl::parse(&url).ok());
128129
Self {
129-
inner: Tag::coordinate(coordinate.deref().clone()),
130+
inner: Tag::coordinate(coordinate.deref().clone(), relay_url),
130131
}
131132
}
132133

src/protocol/nips/nip98.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl JsHttpData {
7373

7474
#[wasm_bindgen(getter)]
7575
pub fn method(&self) -> JsHttpMethod {
76-
self.inner.method.clone().into()
76+
self.inner.method.into()
7777
}
7878

7979
#[wasm_bindgen(getter)]

src/relay/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ pub enum JsRelayStatus {
8282
Disconnected,
8383
/// Completely disconnected
8484
Terminated,
85+
/// The relay has been banned.
86+
Banned,
8587
}
8688

8789
impl From<RelayStatus> for JsRelayStatus {
@@ -93,6 +95,7 @@ impl From<RelayStatus> for JsRelayStatus {
9395
RelayStatus::Connected => Self::Connected,
9496
RelayStatus::Disconnected => Self::Disconnected,
9597
RelayStatus::Terminated => Self::Terminated,
98+
RelayStatus::Banned => Self::Banned,
9699
}
97100
}
98101
}

0 commit comments

Comments
 (0)