Skip to content

Commit

Permalink
fix typos on mostro v0.12.0 (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkanoider committed Jun 10, 2024
1 parent 6f54ceb commit 4120c04
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 11 additions & 6 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ use nostr_sdk::prelude::*;
use sqlx::{Pool, Sqlite};
use std::sync::Arc;
use tokio::sync::Mutex;
use tracing::info;
use tracing::error;
use tracing::info;

fn warning_msg(action: &Action, e: anyhow::Error) {
tracing::warn!("Error in {} with context {}", action, e);
Expand Down Expand Up @@ -77,21 +77,24 @@ pub async fn run(
}
Action::TakeSell => {
if let Err(e) =
take_sell_action(msg, &event, &my_keys, &pool).await
take_sell_action(msg, &event, &my_keys, &pool)
.await
{
warning_msg(&action, e)
}
}
Action::TakeBuy => {
if let Err(e) =
take_buy_action(msg, &event, &my_keys, &pool).await
take_buy_action(msg, &event, &my_keys, &pool)
.await
{
warning_msg(&action, e)
}
}
Action::FiatSent => {
if let Err(e) =
fiat_sent_action(msg, &event, &my_keys, &pool).await
fiat_sent_action(msg, &event, &my_keys, &pool)
.await
{
warning_msg(&action, e)
}
Expand Down Expand Up @@ -138,7 +141,8 @@ pub async fn run(
}
Action::Dispute => {
if let Err(e) =
dispute_action(msg, &event, &my_keys, &pool).await
dispute_action(msg, &event, &my_keys, &pool)
.await
{
warning_msg(&action, e)
}
Expand Down Expand Up @@ -172,7 +176,8 @@ pub async fn run(
}
Action::AdminTakeDispute => {
if let Err(e) =
admin_take_dispute_action(msg, &event, &pool).await
admin_take_dispute_action(msg, &event, &pool)
.await
{
warning_msg(&action, e)
}
Expand Down
8 changes: 0 additions & 8 deletions src/nip33.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@ fn create_fiat_amt_string(order: &Order) -> String {
}
}

fn create_rating_string(rating: Option<Rating>) -> String {
if rating.is_some() {
format!("{:?}", rating.unwrap(),)
} else {
"No user reputation received".to_string()
}
}

/// Transform an order fields to tags
///
/// # Arguments
Expand Down
3 changes: 0 additions & 3 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,6 @@ pub async fn publish_order(
// CRUD order creation
let mut order = new_order_db.clone().create(pool).await?;
let order_id = order.id;
// Get user reputation
let reputation = get_user_reputation(initiator_pubkey, keys).await?;

info!("New order saved Id: {}", order_id);
// Get user reputation
let reputation = get_user_reputation(initiator_pubkey, keys).await?;
Expand Down

0 comments on commit 4120c04

Please sign in to comment.