diff --git a/common/nym_offline_compact_ecash/src/scheme/aggregation.rs b/common/nym_offline_compact_ecash/src/scheme/aggregation.rs index b6c4e38a00..8ccb475bbf 100644 --- a/common/nym_offline_compact_ecash/src/scheme/aggregation.rs +++ b/common/nym_offline_compact_ecash/src/scheme/aggregation.rs @@ -11,11 +11,10 @@ use itertools::Itertools; use crate::common_types::{PartialSignature, Signature, SignatureShare, SignerIndex}; use crate::error::{CompactEcashError, Result}; use crate::scheme::expiration_date_signatures::scalar_date; -use crate::scheme::expiration_date_signatures::scalar_type; use crate::scheme::keygen::{SecretKeyUser, VerificationKeyAuth}; use crate::scheme::withdrawal::RequestInfo; use crate::scheme::{PartialWallet, Wallet, WalletSignatures}; -use crate::utils::{check_bilinear_pairing, perform_lagrangian_interpolation_at_origin}; +use crate::utils::{check_bilinear_pairing, perform_lagrangian_interpolation_at_origin, scalar_type}; use crate::{ecash_group_parameters, Attribute}; pub(crate) trait Aggregatable: Sized { diff --git a/common/nym_offline_compact_ecash/src/scheme/expiration_date_signatures.rs b/common/nym_offline_compact_ecash/src/scheme/expiration_date_signatures.rs index e859ff203a..b419d0ef73 100644 --- a/common/nym_offline_compact_ecash/src/scheme/expiration_date_signatures.rs +++ b/common/nym_offline_compact_ecash/src/scheme/expiration_date_signatures.rs @@ -411,15 +411,6 @@ pub fn scalar_date(scalar: &Scalar) -> u64 { u64::from_le_bytes([b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7]]) } -pub fn type_scalar(t_type: u64) -> Scalar { - Scalar::from(t_type) -} - -pub fn scalar_type(scalar: &Scalar) -> u64 { - let b = scalar.to_bytes(); - u64::from_le_bytes([b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7]]) -} - #[cfg(test)] mod tests { use super::*; diff --git a/common/nym_offline_compact_ecash/src/utils.rs b/common/nym_offline_compact_ecash/src/utils.rs index 57a648fff2..d5a8d36b0d 100644 --- a/common/nym_offline_compact_ecash/src/utils.rs +++ b/common/nym_offline_compact_ecash/src/utils.rs @@ -402,3 +402,8 @@ mod tests { assert_ne!(hash_to_scalar(msg1), hash_to_scalar(msg2)); } } + +pub fn scalar_type(scalar: &Scalar) -> u64 { + let b = scalar.to_bytes(); + u64::from_le_bytes([b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7]]) +} \ No newline at end of file