From 7f3300f23aebf78918cd59820bb16d776452efbf Mon Sep 17 00:00:00 2001 From: Tupui <23188539+tupui@users.noreply.github.com> Date: Fri, 9 Aug 2024 21:54:59 +0200 Subject: [PATCH] Fix register event key, name ordering --- contracts/versioning/src/lib.rs | 2 +- contracts/versioning/src/test.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/versioning/src/lib.rs b/contracts/versioning/src/lib.rs index e0b80bb..a90a02a 100755 --- a/contracts/versioning/src/lib.rs +++ b/contracts/versioning/src/lib.rs @@ -123,7 +123,7 @@ impl Versioning { env.storage().persistent().set(&key_, &project); env.events() - .publish((symbol_short!("register"), name), key.clone()); + .publish((symbol_short!("register"), key.clone()), name); key } } diff --git a/contracts/versioning/src/test.rs b/contracts/versioning/src/test.rs index 0eda691..04775df 100755 --- a/contracts/versioning/src/test.rs +++ b/contracts/versioning/src/test.rs @@ -92,8 +92,8 @@ fn test() { &env, ( contract_id.clone(), - (symbol_short!("register"), name.clone()).into_val(&env), - id.clone().into_val(&env) + (symbol_short!("register"), id.clone()).into_val(&env), + name.into_val(&env) ), ( contract_id.clone(),