|
@@ -17,7 +17,6 @@ use cdk::nuts::{
|
|
PreMintSecrets, ProofState, Proofs, SecretKey, SpendingConditions, State, SwapRequest,
|
|
PreMintSecrets, ProofState, Proofs, SecretKey, SpendingConditions, State, SwapRequest,
|
|
};
|
|
};
|
|
use cdk::subscription::{IndexableParams, Params};
|
|
use cdk::subscription::{IndexableParams, Params};
|
|
-use cdk::types::QuoteTTL;
|
|
|
|
use cdk::util::unix_time;
|
|
use cdk::util::unix_time;
|
|
use cdk::Mint;
|
|
use cdk::Mint;
|
|
use cdk_fake_wallet::FakeWallet;
|
|
use cdk_fake_wallet::FakeWallet;
|
|
@@ -337,7 +336,7 @@ async fn test_swap_unbalanced() -> Result<()> {
|
|
async fn test_swap_overpay_underpay_fee() -> Result<()> {
|
|
async fn test_swap_overpay_underpay_fee() -> Result<()> {
|
|
let mint = new_mint(1).await;
|
|
let mint = new_mint(1).await;
|
|
|
|
|
|
- mint.rotate_keyset(CurrencyUnit::Sat, 1, 32, 1, HashMap::new())
|
|
|
|
|
|
+ mint.rotate_keyset(CurrencyUnit::Sat, 1, 32, 1, &HashMap::new())
|
|
.await?;
|
|
.await?;
|
|
|
|
|
|
let keys = mint.pubkeys().await?.keysets.first().unwrap().clone().keys;
|
|
let keys = mint.pubkeys().await?.keysets.first().unwrap().clone().keys;
|
|
@@ -466,16 +465,11 @@ async fn test_correct_keyset() -> Result<()> {
|
|
mint_builder = mint_builder
|
|
mint_builder = mint_builder
|
|
.with_name("regtest mint".to_string())
|
|
.with_name("regtest mint".to_string())
|
|
.with_description("regtest mint".to_string())
|
|
.with_description("regtest mint".to_string())
|
|
|
|
+ .with_quote_ttl(10000, 1000)
|
|
.with_seed(mnemonic.to_seed_normalized("").to_vec());
|
|
.with_seed(mnemonic.to_seed_normalized("").to_vec());
|
|
|
|
|
|
let mint = mint_builder.build().await?;
|
|
let mint = mint_builder.build().await?;
|
|
|
|
|
|
- localstore
|
|
|
|
- .set_mint_info(mint_builder.mint_info.clone())
|
|
|
|
- .await?;
|
|
|
|
- let quote_ttl = QuoteTTL::new(10000, 10000);
|
|
|
|
- localstore.set_quote_ttl(quote_ttl).await?;
|
|
|
|
-
|
|
|
|
mint.rotate_next_keyset(CurrencyUnit::Sat, 32, 0).await?;
|
|
mint.rotate_next_keyset(CurrencyUnit::Sat, 32, 0).await?;
|
|
mint.rotate_next_keyset(CurrencyUnit::Sat, 32, 0).await?;
|
|
mint.rotate_next_keyset(CurrencyUnit::Sat, 32, 0).await?;
|
|
|
|
|