From bf7ae4a59d92086329c6e7702886123228d67bb9 Mon Sep 17 00:00:00 2001 From: Kadan Stadelmann Date: Thu, 31 Oct 2024 08:30:13 +0100 Subject: [PATCH 1/2] add ed25519 pubkey --- mm2src/common/common.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm2src/common/common.rs b/mm2src/common/common.rs index 75b0072274..272ad9ab4b 100644 --- a/mm2src/common/common.rs +++ b/mm2src/common/common.rs @@ -204,9 +204,7 @@ pub const SATOSHIS: u64 = 100_000_000; pub const DEX_FEE_ADDR_PUBKEY: &str = "03bc2c7ba671bae4a6fc835244c9762b41647b9827d4780a89a949b984a8ddcc06"; -// TODO: needs a real key -// pubkey of iguana passphrase "horribly insecure passphrase" for now -pub const DEX_FEE_PUBKEY_ED25510: &str = "8483e8da48fbac06b292fcd077a71078d094789fccfab581debd4dd13410ea08"; +pub const DEX_FEE_PUBKEY_ED25510: &str = "77b0936728f63257b074c7b3fb2c4fad98df345f57de1ec418fc42619e4e29f8"; pub const PROXY_REQUEST_EXPIRATION_SEC: i64 = 15; From a614cc9285f3fe9fe394b169273124512e0bf27e Mon Sep 17 00:00:00 2001 From: shamardy Date: Thu, 31 Oct 2024 15:00:51 +0300 Subject: [PATCH 2/2] fix typo in ED25519 dex pubkey const --- mm2src/coins/siacoin.rs | 6 +++--- mm2src/common/common.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mm2src/coins/siacoin.rs b/mm2src/coins/siacoin.rs index 5090f68e2d..e29f954198 100644 --- a/mm2src/coins/siacoin.rs +++ b/mm2src/coins/siacoin.rs @@ -15,7 +15,7 @@ use async_trait::async_trait; use common::executor::abortable_queue::AbortableQueue; use common::executor::{AbortableSystem, AbortedError, Timer}; use common::log::info; -use common::DEX_FEE_PUBKEY_ED25510; +use common::DEX_FEE_PUBKEY_ED25519; use derive_more::{From, Into}; use futures::compat::Future01CompatExt; use futures::{FutureExt, TryFutureExt}; @@ -53,7 +53,7 @@ use mm2_err_handle::prelude::*; lazy_static! { pub static ref FEE_PUBLIC_KEY_BYTES: Vec = - hex::decode(DEX_FEE_PUBKEY_ED25510).expect("DEX_FEE_PUBKEY_ED25510 is a valid hex string"); + hex::decode(DEX_FEE_PUBKEY_ED25519).expect("DEX_FEE_PUBKEY_ED25510 is a valid hex string"); pub static ref FEE_PUBLIC_KEY: PublicKey = PublicKey::from_bytes(&FEE_PUBLIC_KEY_BYTES).expect("DEX_FEE_PUBKEY_ED25510 is a valid PublicKey"); pub static ref FEE_ADDR: Address = Address::from_public_key(&FEE_PUBLIC_KEY); @@ -1878,7 +1878,7 @@ mod tests { /// Test the .expect()s used during lazy_static initialization of FEE_PUBLIC_KEY #[test] fn test_sia_fee_pubkey_init() { - let pubkey_bytes: Vec = hex::decode(DEX_FEE_PUBKEY_ED25510).unwrap(); + let pubkey_bytes: Vec = hex::decode(DEX_FEE_PUBKEY_ED25519).unwrap(); let pubkey = PublicKey::from_bytes(&FEE_PUBLIC_KEY_BYTES).unwrap(); assert_eq!(pubkey_bytes, *FEE_PUBLIC_KEY_BYTES); assert_eq!(pubkey, *FEE_PUBLIC_KEY); diff --git a/mm2src/common/common.rs b/mm2src/common/common.rs index 272ad9ab4b..1ecd7f3bd3 100644 --- a/mm2src/common/common.rs +++ b/mm2src/common/common.rs @@ -204,7 +204,7 @@ pub const SATOSHIS: u64 = 100_000_000; pub const DEX_FEE_ADDR_PUBKEY: &str = "03bc2c7ba671bae4a6fc835244c9762b41647b9827d4780a89a949b984a8ddcc06"; -pub const DEX_FEE_PUBKEY_ED25510: &str = "77b0936728f63257b074c7b3fb2c4fad98df345f57de1ec418fc42619e4e29f8"; +pub const DEX_FEE_PUBKEY_ED25519: &str = "77b0936728f63257b074c7b3fb2c4fad98df345f57de1ec418fc42619e4e29f8"; pub const PROXY_REQUEST_EXPIRATION_SEC: i64 = 15;