mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-12 00:10:49 -04:00
Do not re-export curve25519_dalek
Anything that needs to be re-exported by this crate from `curve25519_dalek` can be re-exported from the `monero` module. In fact, the `Scalar` type was already being re-exported.
This commit is contained in:
parent
cea1af1e1a
commit
0dd01c3a3b
3 changed files with 5 additions and 6 deletions
|
@ -53,4 +53,3 @@ pub mod serde;
|
|||
pub mod transport;
|
||||
|
||||
pub use cross_curve_dleq;
|
||||
pub use curve25519_dalek;
|
||||
|
|
|
@ -70,7 +70,6 @@ pub mod monero_amount {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use curve25519_dalek::scalar::Scalar;
|
||||
use rand::rngs::OsRng;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
@ -82,7 +81,9 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn serde_monero_private_key() {
|
||||
let key = MoneroPrivateKey(monero::PrivateKey::from_scalar(Scalar::random(&mut OsRng)));
|
||||
let key = MoneroPrivateKey(monero::PrivateKey::from_scalar(
|
||||
crate::monero::Scalar::random(&mut OsRng),
|
||||
));
|
||||
let encoded = serde_cbor::to_vec(&key).unwrap();
|
||||
let decoded: MoneroPrivateKey = serde_cbor::from_slice(&encoded).unwrap();
|
||||
assert_eq!(key, decoded);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue