diff --git a/Cargo.lock b/Cargo.lock index af8b8d5..bc56ad1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -397,7 +397,7 @@ checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" [[package]] name = "cdk" version = "0.1.0" -source = "git+https://github.com/cashubtc/cdk?rev=efd9b39#efd9b397225bf2c9f7d29aef859a4eb85a3e561e" +source = "git+https://github.com/cashubtc/cdk?rev=267e5f0#267e5f044d8e99a698dd6662b54483a65d8648b9" dependencies = [ "async-trait", "base64 0.22.0", @@ -421,7 +421,7 @@ dependencies = [ [[package]] name = "cdk-redb" version = "0.1.0" -source = "git+https://github.com/cashubtc/cdk?rev=efd9b39#efd9b397225bf2c9f7d29aef859a4eb85a3e561e" +source = "git+https://github.com/cashubtc/cdk?rev=267e5f0#267e5f044d8e99a698dd6662b54483a65d8648b9" dependencies = [ "async-trait", "cdk", diff --git a/Cargo.toml b/Cargo.toml index 54f5250..806feb7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,8 +33,8 @@ time = "0.3.22" chrono = "0.4.26" clap = { version = "4.3.14", features = ["env", "default", "derive"]} anyhow = "1.0.71" -cdk = { git = "https://github.com/cashubtc/cdk", rev = "efd9b39", default-features = false, features = ["mint"] } -cdk-redb = { git = "https://github.com/cashubtc/cdk", rev = "efd9b39", default-features = false, features = ["mint"] } +cdk = { git = "https://github.com/cashubtc/cdk", rev = "267e5f0", default-features = false, features = ["mint"] } +cdk-redb = { git = "https://github.com/cashubtc/cdk", rev = "267e5f0", default-features = false, features = ["mint"] } # cdk = { path = "../../cdk/nut14/crates/cdk", default-features = false, features = ["mint", "all-nuts"] } # cdk-redb = { path = "../../cdk/nut14/crates/cdk-redb" } diff --git a/flake.lock b/flake.lock index 7c67b5e..5dd5813 100644 --- a/flake.lock +++ b/flake.lock @@ -175,11 +175,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1711668574, - "narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=", + "lastModified": 1717530100, + "narHash": "sha256-b4Dn+PnrZoVZ/BoR9JN2fTxXxplJrAsdSUIePf4Cacs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659", + "rev": "a2e1d0414259a144ebdc048408a807e69e0565af", "type": "github" }, "original": { diff --git a/src/main.rs b/src/main.rs index 656ae8e..6a5d9eb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,7 +16,6 @@ use axum::routing::{get, post}; use axum::Router; use bip39::Mnemonic; use cdk::amount::Amount; -use cdk::cdk_database::MintDatabase; use cdk::mint::Mint; use cdk::nuts::nut02::Id; use cdk::nuts::{ @@ -71,13 +70,12 @@ async fn main() -> anyhow::Result<()> { let localstore = MintRedbDatabase::new(db_path.to_str().unwrap())?; let mint_info = MintInfo::default(); - //settings.mint_info.clone(); - localstore.set_mint_info(&mint_info).await?; let mnemonic = Mnemonic::from_str(&settings.info.mnemonic)?; let mint = Mint::new( &mnemonic.to_seed_normalized(""), + mint_info, Arc::new(localstore), Amount::ZERO, 0.0, @@ -410,13 +408,7 @@ async fn post_check( async fn get_mint_info(State(state): State) -> Result, Response> { Ok(Json( - state - .mint - .lock() - .await - .mint_info() - .await - .map_err(into_response)?, + state.mint.lock().await.mint_info().map_err(into_response)?, )) }