From 826e807f4579570fd9f27e459b15fa112c422390 Mon Sep 17 00:00:00 2001 From: h3rt <94856309+SecretSaturn@users.noreply.github.com> Date: Tue, 10 Sep 2024 03:05:30 +0200 Subject: [PATCH] Rust unit-test ecdsa recover fix --- TNLS-Gateways/secret/Cargo.toml | 3 +- TNLS-Gateways/secret/src/contract.rs | 85 +++++++++++++++++++++++----- 2 files changed, 73 insertions(+), 15 deletions(-) diff --git a/TNLS-Gateways/secret/Cargo.toml b/TNLS-Gateways/secret/Cargo.toml index d2415e4..c415448 100644 --- a/TNLS-Gateways/secret/Cargo.toml +++ b/TNLS-Gateways/secret/Cargo.toml @@ -41,7 +41,8 @@ serde = { version = "1.0.144", default-features = false, features = ["derive"] } serde-json-wasm = "0.5.0" base64 = "0.21.0" hex = "0.4.3" -sha3 = "0.10.4" +sha3 = "0.10.8" +sha2 = "0.10.8" secp256k1 = { version = "0.26.0", features = ["serde", "recovery"] } chacha20poly1305 = "0.9.1" secret-toolkit = { version = "0.10.0", default-features = false, features = ["crypto", "utils", "serialization", "storage"] } diff --git a/TNLS-Gateways/secret/src/contract.rs b/TNLS-Gateways/secret/src/contract.rs index b76a176..9adbf0e 100644 --- a/TNLS-Gateways/secret/src/contract.rs +++ b/TNLS-Gateways/secret/src/contract.rs @@ -346,15 +346,27 @@ fn post_execution(deps: DepsMut, env: Env, msg: PostExecutionMsg) -> StdResult StdResult