Skip to content

Commit f5bf95e

Browse files
committed
Fix instruction name
1 parent 229c301 commit f5bf95e

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

programs/system/src/instructions/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ mod create_account_with_seed;
99
mod initialize_nonce_account;
1010
mod transfer;
1111
mod transfer_with_seed;
12-
mod update_nonce_account;
12+
mod upgrade_nonce_account;
1313
mod withdraw_nonce_account;
1414

1515
pub use advance_nonce_account::*;
@@ -23,5 +23,5 @@ pub use create_account_with_seed::*;
2323
pub use initialize_nonce_account::*;
2424
pub use transfer::*;
2525
pub use transfer_with_seed::*;
26-
pub use update_nonce_account::*;
26+
pub use upgrade_nonce_account::*;
2727
pub use withdraw_nonce_account::*;
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use pinocchio::{
22
account_info::AccountInfo,
3-
instruction::{AccountMeta, Instruction, Signer},
4-
program::invoke_signed,
3+
cpi::invoke,
4+
instruction::{AccountMeta, Instruction},
55
ProgramResult,
66
};
77

@@ -10,19 +10,14 @@ use pinocchio::{
1010
///
1111
/// ### Accounts:
1212
/// 0. `[WRITE]` Nonce account
13-
pub struct UpdateNonceAccount<'a> {
13+
pub struct UpgradeNonceAccount<'a> {
1414
/// Nonce account.
1515
pub account: &'a AccountInfo,
1616
}
1717

18-
impl UpdateNonceAccount<'_> {
18+
impl UpgradeNonceAccount<'_> {
1919
#[inline(always)]
2020
pub fn invoke(&self) -> ProgramResult {
21-
self.invoke_signed(&[])
22-
}
23-
24-
#[inline(always)]
25-
pub fn invoke_signed(&self, signers: &[Signer]) -> ProgramResult {
2621
// account metadata
2722
let account_metas: [AccountMeta; 1] = [AccountMeta::writable(self.account.key())];
2823

@@ -33,6 +28,6 @@ impl UpdateNonceAccount<'_> {
3328
data: &[12],
3429
};
3530

36-
invoke_signed(&instruction, &[self.account], signers)
31+
invoke(&instruction, &[self.account])
3732
}
3833
}

0 commit comments

Comments
 (0)