mirror of
https://github.com/RoboSats/taptrade-core.git
synced 2025-07-20 09:43:30 +00:00
coordinator wallet
This commit is contained in:
@ -25,6 +25,9 @@ async fn receive_order(
|
||||
// order.field2
|
||||
// )
|
||||
|
||||
// insert offer into sql database
|
||||
// generate locking address for bond
|
||||
|
||||
println!("Coordinator received new offer: {:?}", order);
|
||||
Ok(Json(BondRequirementResponse {
|
||||
bond_address: bond_address,
|
||||
|
@ -2,6 +2,8 @@ mod communication;
|
||||
mod coordinator;
|
||||
|
||||
use anyhow::{anyhow, Error, Result};
|
||||
use bdk::database::MemoryDatabase;
|
||||
use bdk::Wallet;
|
||||
use communication::api_server;
|
||||
use dotenv::dotenv;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@ -12,6 +14,7 @@ use std::sync::Arc;
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Coordinator {
|
||||
pub db_pool: Arc<Pool<Sqlite>>,
|
||||
pub wallet: Arc<Wallet<MemoryDatabase>>, // using sqlite for Wallet?
|
||||
}
|
||||
|
||||
// populate .env with values before starting
|
||||
@ -27,6 +30,7 @@ async fn main() -> Result<()> {
|
||||
|
||||
let coordinator = Coordinator {
|
||||
db_pool: shared_db_pool,
|
||||
wallet: // impl wallet
|
||||
};
|
||||
|
||||
api_server(coordinator).await?;
|
||||
|
Reference in New Issue
Block a user