From 9f941f36f8a3cc5602b5d77f1c55063e1413ddec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Wed, 27 Jul 2022 14:46:31 +0900 Subject: [PATCH] Allow unsetting proposed_owner --- contracts/programs/access-controller/src/lib.rs | 1 - contracts/programs/ocr2/src/lib.rs | 1 - contracts/programs/store/src/lib.rs | 2 -- 3 files changed, 4 deletions(-) diff --git a/contracts/programs/access-controller/src/lib.rs b/contracts/programs/access-controller/src/lib.rs index 2bda02d8c..ecc49493a 100644 --- a/contracts/programs/access-controller/src/lib.rs +++ b/contracts/programs/access-controller/src/lib.rs @@ -40,7 +40,6 @@ pub mod access_controller { ctx: Context, proposed_owner: Pubkey, ) -> Result<()> { - require!(proposed_owner != Pubkey::default(), InvalidInput); let state = &mut *ctx.accounts.state.load_mut()?; state.proposed_owner = proposed_owner; Ok(()) diff --git a/contracts/programs/ocr2/src/lib.rs b/contracts/programs/ocr2/src/lib.rs index 892607ab5..2080619dd 100644 --- a/contracts/programs/ocr2/src/lib.rs +++ b/contracts/programs/ocr2/src/lib.rs @@ -71,7 +71,6 @@ pub mod ocr2 { ctx: Context, proposed_owner: Pubkey, ) -> Result<()> { - require!(proposed_owner != Pubkey::default(), InvalidInput); let mut state = ctx.accounts.state.load_mut()?; state.config.proposed_owner = proposed_owner; Ok(()) diff --git a/contracts/programs/store/src/lib.rs b/contracts/programs/store/src/lib.rs index f8719f5bd..7a2a8874b 100644 --- a/contracts/programs/store/src/lib.rs +++ b/contracts/programs/store/src/lib.rs @@ -100,7 +100,6 @@ pub mod store { ctx: Context, proposed_owner: Pubkey, ) -> Result<()> { - require!(proposed_owner != Pubkey::default(), InvalidInput); ctx.accounts.feed.proposed_owner = proposed_owner; Ok(()) } @@ -199,7 +198,6 @@ pub mod store { ctx: Context, proposed_owner: Pubkey, ) -> Result<()> { - require!(proposed_owner != Pubkey::default(), InvalidInput); let store = &mut *ctx.accounts.store.load_mut()?; store.proposed_owner = proposed_owner; Ok(())