From a1ef6548adafe1adb5262a1134ebbf4f0a834ede Mon Sep 17 00:00:00 2001 From: jpbogle Date: Sat, 12 Mar 2022 02:08:12 -0700 Subject: [PATCH] Allow alternative collector --- .../cardinal-time-invalidator/src/instructions/invalidate.rs | 3 ++- .../cardinal-use-invalidator/src/instructions/invalidate.rs | 3 ++- src/idl/cardinal_time_invalidator.ts | 4 ++-- src/idl/cardinal_use_invalidator.ts | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/programs/cardinal-time-invalidator/src/instructions/invalidate.rs b/programs/cardinal-time-invalidator/src/instructions/invalidate.rs index ed44bb485..507fc90b8 100644 --- a/programs/cardinal-time-invalidator/src/instructions/invalidate.rs +++ b/programs/cardinal-time-invalidator/src/instructions/invalidate.rs @@ -19,8 +19,9 @@ pub struct InvalidateCtx<'info> { )] time_invalidator: Box>, + /// CHECK: This is not dangerous because we don't read or write from this account #[account(mut)] - invalidator: Signer<'info>, + invalidator: AccountInfo<'info>, cardinal_token_manager: Program<'info, CardinalTokenManager>, /// CHECK: This is not dangerous because we don't read or write from this account diff --git a/programs/cardinal-use-invalidator/src/instructions/invalidate.rs b/programs/cardinal-use-invalidator/src/instructions/invalidate.rs index 2140c3ba8..f52eef26b 100644 --- a/programs/cardinal-use-invalidator/src/instructions/invalidate.rs +++ b/programs/cardinal-use-invalidator/src/instructions/invalidate.rs @@ -12,8 +12,9 @@ pub struct InvalidateCtx<'info> { #[account(mut, constraint = use_invalidator.usages >= use_invalidator.total_usages.unwrap() @ ErrorCode::InsufficientUsages)] use_invalidator: Box>, + /// CHECK: This is not dangerous because we don't read or write from this account #[account(mut)] - invalidator: Signer<'info>, + invalidator: AccountInfo<'info>, // programs cardinal_token_manager: Program<'info, CardinalTokenManager>, diff --git a/src/idl/cardinal_time_invalidator.ts b/src/idl/cardinal_time_invalidator.ts index 758be75bb..7efd82763 100644 --- a/src/idl/cardinal_time_invalidator.ts +++ b/src/idl/cardinal_time_invalidator.ts @@ -113,7 +113,7 @@ export type CardinalTimeInvalidator = { { name: "invalidator"; isMut: true; - isSigner: true; + isSigner: false; }, { name: "cardinalTokenManager"; @@ -451,7 +451,7 @@ export const IDL: CardinalTimeInvalidator = { { name: "invalidator", isMut: true, - isSigner: true, + isSigner: false, }, { name: "cardinalTokenManager", diff --git a/src/idl/cardinal_use_invalidator.ts b/src/idl/cardinal_use_invalidator.ts index 8b20812a9..841e8b410 100644 --- a/src/idl/cardinal_use_invalidator.ts +++ b/src/idl/cardinal_use_invalidator.ts @@ -128,7 +128,7 @@ export type CardinalUseInvalidator = { { name: "invalidator"; isMut: true; - isSigner: true; + isSigner: false; }, { name: "cardinalTokenManager"; @@ -463,7 +463,7 @@ export const IDL: CardinalUseInvalidator = { { name: "invalidator", isMut: true, - isSigner: true, + isSigner: false, }, { name: "cardinalTokenManager",