|
@@ -48,6 +48,7 @@ pub struct Mint {
|
|
|
secp_ctx: Secp256k1<secp256k1::All>,
|
|
|
xpriv: Xpriv,
|
|
|
keysets: Arc<RwLock<HashMap<Id, MintKeySet>>>,
|
|
|
+ custom_paths: HashMap<CurrencyUnit, DerivationPath>,
|
|
|
}
|
|
|
|
|
|
impl Mint {
|
|
@@ -184,6 +185,7 @@ impl Mint {
|
|
|
localstore,
|
|
|
ln,
|
|
|
keysets,
|
|
|
+ custom_paths,
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -745,7 +747,7 @@ mod tests {
|
|
|
assert!(keysets.keysets.is_empty());
|
|
|
|
|
|
// generate the first keyset and set it to active
|
|
|
- mint.rotate_keyset(CurrencyUnit::default(), 0, 1, 1, HashMap::new())
|
|
|
+ mint.rotate_keyset(CurrencyUnit::default(), 0, 1, 1, &HashMap::new())
|
|
|
.await?;
|
|
|
|
|
|
let keysets = mint.keysets().await.unwrap();
|
|
@@ -754,7 +756,7 @@ mod tests {
|
|
|
let first_keyset_id = keysets.keysets[0].id;
|
|
|
|
|
|
// set the first keyset to inactive and generate a new keyset
|
|
|
- mint.rotate_keyset(CurrencyUnit::default(), 1, 1, 1, HashMap::new())
|
|
|
+ mint.rotate_keyset(CurrencyUnit::default(), 1, 1, 1, &HashMap::new())
|
|
|
.await?;
|
|
|
|
|
|
let keysets = mint.keysets().await.unwrap();
|
|
@@ -786,7 +788,7 @@ mod tests {
|
|
|
};
|
|
|
let mint = create_mint(config).await?;
|
|
|
|
|
|
- mint.rotate_keyset(CurrencyUnit::default(), 0, 32, 1, HashMap::new())
|
|
|
+ mint.rotate_keyset(CurrencyUnit::default(), 0, 32, 1, &HashMap::new())
|
|
|
.await?;
|
|
|
|
|
|
let keys = mint.keysets.read().await.clone();
|