Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.78-bookworm AS builder
FROM rust:1.88-bookworm AS builder

WORKDIR /app

Expand Down
9 changes: 8 additions & 1 deletion backend/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ mod types;
use std::{net::SocketAddr, sync::Arc};

use anyhow::{Context, Result};
use tower_http::cors::{Any, CorsLayer};

use crate::{config::Config, events::EventBus};

Expand All @@ -20,11 +21,17 @@ pub async fn start(config: Arc<Config>, event_bus: Arc<EventBus>) -> Result<()>
.with_context(|| format!("WEB_BIND_ADDR 파싱 실패: {}", config.web_bind_addr))?;

let firebase_repository = Arc::new(repository::FirebaseRepository::from_env()?);
let cors = CorsLayer::new()
.allow_origin(Any)
.allow_methods(Any)
.allow_headers(Any);

let app = router::build_router(state::AppState {
config,
firebase_repository,
event_bus,
});
})
.layer(cors);

tracing::info!("[api] listening on http://{addr}");

Expand Down
120 changes: 0 additions & 120 deletions backend/src/cache.rs

This file was deleted.

3 changes: 3 additions & 0 deletions backend/src/oracle/program_accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub struct MasterPolicyInfo {
pub reinsurer_deposit_wallet: String,
pub leader_deposit_wallet: String,
pub participants: Vec<MasterParticipantInfo>,
pub oracle_feed: String,
pub status: u8,
pub status_label: String,
pub created_at: i64,
Expand Down Expand Up @@ -150,6 +151,7 @@ fn parse_master_policy(pubkey: &Pubkey, data: &[u8]) -> Result<MasterPolicyInfo>
let reinsurer_deposit_wallet = read_pubkey(data, &mut offset)?;
let leader_deposit_wallet = read_pubkey(data, &mut offset)?;
let participants = read_master_participants(data, &mut offset)?;
let oracle_feed = read_pubkey(data, &mut offset)?;
let status = read_u8(data, &mut offset)?;
let created_at = read_i64(data, &mut offset)?;
let _bump = read_u8(data, &mut offset)?;
Expand All @@ -176,6 +178,7 @@ fn parse_master_policy(pubkey: &Pubkey, data: &[u8]) -> Result<MasterPolicyInfo>
reinsurer_deposit_wallet: reinsurer_deposit_wallet.to_string(),
leader_deposit_wallet: leader_deposit_wallet.to_string(),
participants,
oracle_feed: oracle_feed.to_string(),
status,
status_label: master_policy_status_label(status).to_string(),
created_at,
Expand Down
Loading
Loading