From 892308ff76eab6ad4ab34e6624a6578e00c5c58d Mon Sep 17 00:00:00 2001 From: Constantin Dogaru Date: Wed, 27 Apr 2022 14:01:39 +0300 Subject: [PATCH] replace assertion logic by macro --- sputnikdao2/src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sputnikdao2/src/lib.rs b/sputnikdao2/src/lib.rs index b95e81b77..27af4ab13 100644 --- a/sputnikdao2/src/lib.rs +++ b/sputnikdao2/src/lib.rs @@ -110,13 +110,9 @@ impl Contract { /// This is NOOP implementation. KEEP IT if you haven't changed contract state. /// If you have changed state, you need to implement migration from old state (keep the old struct with different name to deserialize it first). /// After migrate goes live on MainNet, return this implementation for next updates. + #[private] #[init(ignore_state)] pub fn migrate() -> Self { - assert_eq!( - env::predecessor_account_id(), - env::current_account_id(), - "ERR_NOT_ALLOWED" - ); let this: Contract = env::state_read().expect("ERR_CONTRACT_IS_NOT_INITIALIZED"); this }