Skip to content

Commit

Permalink
move use avoid linter
Browse files Browse the repository at this point in the history
  • Loading branch information
vazw committed May 27, 2024
1 parent f5329b1 commit 3adc036
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/core_api/api.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::str::FromStr;
use leptos::*;
use serde::{Deserialize, Serialize};
use nostr_sdk::prelude::*;
Expand Down Expand Up @@ -76,6 +75,7 @@ pub async fn count_users(_count: i32) -> Result<CountsRespon, ServerFnError> {

#[server]
pub async fn check_npub(public_key: String) -> Result<UserRespons, ServerFnError> {
use std::str::FromStr;
let mut hex_npub = String::new();
if public_key.starts_with("npub") {
if let Ok(keys) = PublicKey::from_str(&public_key) {
Expand Down Expand Up @@ -139,6 +139,7 @@ pub async fn add_user(
pubkey: String,
lnurl: String,
) -> Result<BoolRespons, ServerFnError> {
use std::str::FromStr;
let mut hex_npub = String::new();
if pubkey.starts_with("npub") {
if let Ok(keys) = PublicKey::from_str(&pubkey) {
Expand Down

0 comments on commit 3adc036

Please sign in to comment.