diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-11-27 17:08:25 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-11-27 17:08:25 +0000 |
| commit | 83448a99aaf18c7a045a081c5de0c22bc4a83de1 (patch) | |
| tree | 28076a33b40e63937d79a8fe8d54b58d42db092c /src/lib/login | |
| parent | 5478aa74cc26452809e499a461067ca9744cb7ce (diff) | |
chore: bump rust-nosrt v0.37.0
use RelayUrl in repo_ref which I had resisted as it mutates relay
urls when printed to append a slash
Diffstat (limited to 'src/lib/login')
| -rw-r--r-- | src/lib/login/fresh.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/login/fresh.rs b/src/lib/login/fresh.rs index 23c4bdc..615c0a6 100644 --- a/src/lib/login/fresh.rs +++ b/src/lib/login/fresh.rs | |||
| @@ -5,7 +5,7 @@ use console::Style; | |||
| 5 | use dialoguer::theme::{ColorfulTheme, Theme}; | 5 | use dialoguer::theme::{ColorfulTheme, Theme}; |
| 6 | use nostr::nips::{nip05, nip46::NostrConnectURI}; | 6 | use nostr::nips::{nip05, nip46::NostrConnectURI}; |
| 7 | use nostr_connect::client::NostrConnect; | 7 | use nostr_connect::client::NostrConnect; |
| 8 | use nostr_sdk::{EventBuilder, Keys, Metadata, NostrSigner, PublicKey, ToBech32, Url}; | 8 | use nostr_sdk::{EventBuilder, Keys, Metadata, NostrSigner, PublicKey, RelayUrl, ToBech32}; |
| 9 | use qrcode::QrCode; | 9 | use qrcode::QrCode; |
| 10 | use tokio::{signal, sync::Mutex}; | 10 | use tokio::{signal, sync::Mutex}; |
| 11 | 11 | ||
| @@ -370,8 +370,8 @@ pub fn generate_nostr_connect_app( | |||
| 370 | client | 370 | client |
| 371 | .get_fallback_signer_relays() | 371 | .get_fallback_signer_relays() |
| 372 | .iter() | 372 | .iter() |
| 373 | .flat_map(|s| Url::parse(s)) | 373 | .flat_map(RelayUrl::parse) |
| 374 | .collect::<Vec<Url>>() | 374 | .collect::<Vec<RelayUrl>>() |
| 375 | } else { | 375 | } else { |
| 376 | vec![] | 376 | vec![] |
| 377 | }; | 377 | }; |
| @@ -438,8 +438,8 @@ pub async fn listen_for_remote_signer( | |||
| 438 | let bunker_url = NostrConnectURI::Bunker { | 438 | let bunker_url = NostrConnectURI::Bunker { |
| 439 | // TODO the remote signer pubkey may not be the user pubkey | 439 | // TODO the remote signer pubkey may not be the user pubkey |
| 440 | remote_signer_public_key: public_key, | 440 | remote_signer_public_key: public_key, |
| 441 | relays: nostr_connect_url.relays(), | 441 | relays: nostr_connect_url.relays().to_vec(), |
| 442 | secret: nostr_connect_url.secret(), | 442 | secret: nostr_connect_url.secret().map(String::from), |
| 443 | }; | 443 | }; |
| 444 | Ok((signer, public_key, bunker_url)) | 444 | Ok((signer, public_key, bunker_url)) |
| 445 | } else { | 445 | } else { |
| @@ -727,7 +727,7 @@ async fn signup( | |||
| 727 | client | 727 | client |
| 728 | .get_fallback_relays() | 728 | .get_fallback_relays() |
| 729 | .iter() | 729 | .iter() |
| 730 | .map(|s| (Url::parse(s).unwrap(), None)), | 730 | .map(|s| (RelayUrl::parse(s).unwrap(), None)), |
| 731 | ) | 731 | ) |
| 732 | .sign_with_keys(&keys)?; | 732 | .sign_with_keys(&keys)?; |
| 733 | eprintln!("publishing user profile to relays"); | 733 | eprintln!("publishing user profile to relays"); |