mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Merge branch 'dalek-4.0' into develop
This commit is contained in:
@@ -21,7 +21,7 @@ use monero_serai::{
|
||||
|
||||
pub fn random_address() -> (Scalar, ViewPair, MoneroAddress) {
|
||||
let spend = random_scalar(&mut OsRng);
|
||||
let spend_pub = &spend * &ED25519_BASEPOINT_TABLE;
|
||||
let spend_pub = &spend * ED25519_BASEPOINT_TABLE;
|
||||
let view = Zeroizing::new(random_scalar(&mut OsRng));
|
||||
(
|
||||
spend,
|
||||
@@ -29,7 +29,7 @@ pub fn random_address() -> (Scalar, ViewPair, MoneroAddress) {
|
||||
MoneroAddress {
|
||||
meta: AddressMeta::new(Network::Mainnet, AddressType::Standard),
|
||||
spend: spend_pub,
|
||||
view: view.deref() * &ED25519_BASEPOINT_TABLE,
|
||||
view: view.deref() * ED25519_BASEPOINT_TABLE,
|
||||
},
|
||||
)
|
||||
}
|
||||
@@ -95,8 +95,8 @@ pub async fn rpc() -> Rpc<HttpRpc> {
|
||||
|
||||
let addr = MoneroAddress {
|
||||
meta: AddressMeta::new(Network::Mainnet, AddressType::Standard),
|
||||
spend: &random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE,
|
||||
view: &random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE,
|
||||
spend: &random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE,
|
||||
view: &random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE,
|
||||
}
|
||||
.to_string();
|
||||
|
||||
@@ -193,7 +193,7 @@ macro_rules! test {
|
||||
let keys = key_gen::<_, Ed25519>(&mut OsRng);
|
||||
|
||||
let spend_pub = if !multisig {
|
||||
spend.deref() * &ED25519_BASEPOINT_TABLE
|
||||
spend.deref() * ED25519_BASEPOINT_TABLE
|
||||
} else {
|
||||
#[cfg(not(feature = "multisig"))]
|
||||
panic!("Multisig branch called without the multisig feature");
|
||||
@@ -215,7 +215,7 @@ macro_rules! test {
|
||||
rpc.get_fee(protocol, FeePriority::Low).await.unwrap(),
|
||||
Some(Change::new(
|
||||
&ViewPair::new(
|
||||
&random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE,
|
||||
&random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE,
|
||||
Zeroizing::new(random_scalar(&mut OsRng))
|
||||
),
|
||||
false
|
||||
|
||||
@@ -104,7 +104,7 @@ test!(
|
||||
use monero_serai::wallet::FeePriority;
|
||||
|
||||
let change_view = ViewPair::new(
|
||||
&random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE,
|
||||
&random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE,
|
||||
Zeroizing::new(random_scalar(&mut OsRng)),
|
||||
);
|
||||
|
||||
@@ -117,7 +117,7 @@ test!(
|
||||
|
||||
// Send to a subaddress
|
||||
let sub_view = ViewPair::new(
|
||||
&random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE,
|
||||
&random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE,
|
||||
Zeroizing::new(random_scalar(&mut OsRng)),
|
||||
);
|
||||
builder.add_payment(
|
||||
|
||||
Reference in New Issue
Block a user