Skip to content

Commit

Permalink
Chain-watcher rebase changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dynco-nym committed Dec 19, 2024
1 parent 9203492 commit bbf2edb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nym-node/src/node/http/router/api/v1/metrics/wireguard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use nym_node_requests::api::v1::metrics::models::WireguardStats;
tag = "Metrics",
responses(
(status = 200, content(
("application/json" = WireguardStats),
("application/yaml" = WireguardStats)
(WireguardStats = "application/json"),
(WireguardStats = "application/yaml")
))
),
params(OutputParams),
Expand Down
2 changes: 1 addition & 1 deletion nyx-chain-watcher/src/db/models.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

#[derive(Clone, Deserialize, Debug)]
#[derive(Clone, Deserialize, Debug, ToSchema)]
pub(crate) struct CurrencyPrices {
pub(crate) chf: f32,
pub(crate) usd: f32,
Expand Down
11 changes: 11 additions & 0 deletions nyx-chain-watcher/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@ pub struct WebhookPayload {
pub message_index: u64,
pub sender_address: String,
pub receiver_address: String,
#[schema(value_type = openapi_schema::Coin)]
pub funds: CosmWasmCoin,
pub height: u128,
pub memo: Option<String>,
}

pub mod openapi_schema {
use super::*;

#[derive(ToSchema)]
pub struct Coin {
pub denom: String,
pub amount: String,
}
}

0 comments on commit bbf2edb

Please sign in to comment.