From d07ceb8088173fd64d7f7eac096ab6e2bbac798f Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Tue, 16 Jul 2024 08:03:21 -0700 Subject: [PATCH] Update constraint to extend delegation --- programs/nft_proxy/src/instructions/assign_proxy_v0.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/nft_proxy/src/instructions/assign_proxy_v0.rs b/programs/nft_proxy/src/instructions/assign_proxy_v0.rs index 324b647..6ed63b6 100644 --- a/programs/nft_proxy/src/instructions/assign_proxy_v0.rs +++ b/programs/nft_proxy/src/instructions/assign_proxy_v0.rs @@ -55,7 +55,7 @@ pub struct AssignProxyV0<'info> { bump, // You can only proxy when it is not currently proxied to someone else. // Recall the proxy before re-delegating if necessary. - constraint = current_proxy_assignment.next_voter == Pubkey::default() + constraint = current_proxy_assignment.next_voter == Pubkey::default() || current_proxy_assignment.next_voter == voter.key() )] pub current_proxy_assignment: Box>, /// CHECK: The wallet being delegated to