monero: match monero's stricter check when decompressing points (#515)

* monero: match monero's stricter check when decompressing points

* Reverted type change for output key
This commit is contained in:
Justin Berman
2024-02-17 20:16:16 -08:00
committed by GitHub
parent 62a619a312
commit df85c09435
17 changed files with 727 additions and 58 deletions

View File

@@ -283,7 +283,7 @@ impl Wallet {
}
Wallet::Monero { handle, ref spend_key, ref view_pair, ref mut inputs } => {
use curve25519_dalek::{constants::ED25519_BASEPOINT_POINT, edwards::CompressedEdwardsY};
use curve25519_dalek::constants::ED25519_BASEPOINT_POINT;
use monero_serai::{
Protocol,
wallet::{
@@ -291,6 +291,7 @@ impl Wallet {
SpendableOutput, Decoys, Change, FeePriority, Scanner, SignableTransaction,
},
rpc::HttpRpc,
decompress_point,
};
use processor::{additional_key, networks::Monero};
@@ -317,8 +318,7 @@ impl Wallet {
.await
.unwrap();
let to_spend_key =
CompressedEdwardsY(<[u8; 32]>::try_from(to.as_ref()).unwrap()).decompress().unwrap();
let to_spend_key = decompress_point(<[u8; 32]>::try_from(to.as_ref()).unwrap()).unwrap();
let to_view_key = additional_key::<Monero>(0);
let to_addr = Address::new(
AddressMeta::new(