Skip to content

Commit

Permalink
Merge pull request #97 from cardinal-labs/collector
Browse files Browse the repository at this point in the history
CRD-97: Allow alternative collector
  • Loading branch information
jpbogle authored Mar 12, 2022
2 parents f3abb69 + a1ef654 commit 321de22
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ pub struct InvalidateCtx<'info> {
)]
time_invalidator: Box<Account<'info, TimeInvalidator>>,

/// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ pub struct InvalidateCtx<'info> {
#[account(mut, constraint = use_invalidator.usages >= use_invalidator.total_usages.unwrap() @ ErrorCode::InsufficientUsages)]
use_invalidator: Box<Account<'info, UseInvalidator>>,

/// 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>,
Expand Down
4 changes: 2 additions & 2 deletions src/idl/cardinal_time_invalidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export type CardinalTimeInvalidator = {
{
name: "invalidator";
isMut: true;
isSigner: true;
isSigner: false;
},
{
name: "cardinalTokenManager";
Expand Down Expand Up @@ -451,7 +451,7 @@ export const IDL: CardinalTimeInvalidator = {
{
name: "invalidator",
isMut: true,
isSigner: true,
isSigner: false,
},
{
name: "cardinalTokenManager",
Expand Down
4 changes: 2 additions & 2 deletions src/idl/cardinal_use_invalidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export type CardinalUseInvalidator = {
{
name: "invalidator";
isMut: true;
isSigner: true;
isSigner: false;
},
{
name: "cardinalTokenManager";
Expand Down Expand Up @@ -463,7 +463,7 @@ export const IDL: CardinalUseInvalidator = {
{
name: "invalidator",
isMut: true,
isSigner: true,
isSigner: false,
},
{
name: "cardinalTokenManager",
Expand Down

0 comments on commit 321de22

Please sign in to comment.