Skip to content

Commit 161e0b0

Browse files
committed
Add error checking
1 parent 59ace1d commit 161e0b0

File tree

2 files changed

+3
-3
lines changed
  • examples/sol-anchor-contract

2 files changed

+3
-3
lines changed

examples/sol-anchor-contract/Anchor.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[programs.devnet]
2-
example_sol_anchor_contract = "BM8eAdE2JbN4HL2vPaZnbsxGH6TTVi11jFbz8t79hXKw"
2+
example_sol_anchor_contract = "4ACQwuQt2ChnPRUV8KwuhVqJvEdusWd3i8JAngHDkp91"
33

44
[provider]
55
cluster = "devnet"

examples/sol-anchor-contract/programs/example-sol-anchor-contract/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use anchor_lang::prelude::*;
33
use solana_program::account_info::AccountInfo;
44
use pyth_sdk_solana::load_price_feed_from_account_info;
55

6-
declare_id!("BM8eAdE2JbN4HL2vPaZnbsxGH6TTVi11jFbz8t79hXKw");
6+
declare_id!("4ACQwuQt2ChnPRUV8KwuhVqJvEdusWd3i8JAngHDkp91");
77

88
#[account]
99
pub struct AdminConfig {
@@ -14,7 +14,7 @@ pub struct AdminConfig {
1414

1515
#[derive(Accounts)]
1616
pub struct InitRequest<'info> {
17-
#[account(address = *program_id)]
17+
#[account(address = *program_id @ ErrorCode::Unauthorized)]
1818
pub program: Signer<'info>,
1919
#[account(mut)]
2020
pub payer: Signer<'info>,

0 commit comments

Comments
 (0)