Skip to content

Commit d522f1f

Browse files
committed
Update pinocchio dependencies
1 parent c97e6c7 commit d522f1f

File tree

4 files changed

+20
-27
lines changed

4 files changed

+20
-27
lines changed

Cargo.lock

Lines changed: 9 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

interface/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ readme = "./README.md"
1212
crate-type = ["rlib"]
1313

1414
[dependencies]
15-
pinocchio = { version = "0.7", git = "https://github.com/febo/pinocchio.git", branch = "febo/error-to-str" }
16-
pinocchio-pubkey = { version = "0.2", git = "https://github.com/febo/pinocchio.git", branch = "febo/error-to-str" }
15+
pinocchio = "0.8"
16+
pinocchio-pubkey = "0.2"
1717

1818
[dev-dependencies]
1919
strum = "0.27"

p-token/Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ crate-type = ["cdylib"]
1515
logging = []
1616

1717
[dependencies]
18-
pinocchio = { version = "0.7", git = "https://github.com/febo/pinocchio.git", branch = "febo/error-to-str" }
19-
pinocchio-log = { version = "0.3", git = "https://github.com/febo/pinocchio.git", branch = "febo/error-to-str" }
18+
pinocchio = "0.8"
19+
pinocchio-log = { version = "0.4", default-features = false }
2020
spl-token-interface = { version = "^0", path = "../interface" }
2121

2222
[dev-dependencies]
@@ -27,3 +27,6 @@ solana-sdk = "2.1"
2727
spl-token = { version="^4", features=["no-entrypoint"] }
2828
spl-token-2022 = { version="^7", features=["no-entrypoint"] }
2929
test-case = "3.3.1"
30+
31+
[lints]
32+
workspace = true

p-token/src/processor/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ const MAX_FORMATTED_DIGITS: usize = u8::MAX as usize + 2;
8181
/// Checks that the account is owned by the expected program.
8282
#[inline(always)]
8383
fn check_account_owner(account_info: &AccountInfo) -> ProgramResult {
84-
if &TOKEN_PROGRAM_ID != account_info.owner() {
85-
Err(ProgramError::IncorrectProgramId)
86-
} else {
84+
if account_info.is_owned_by(&TOKEN_PROGRAM_ID) {
8785
Ok(())
86+
} else {
87+
Err(ProgramError::IncorrectProgramId)
8888
}
8989
}
9090

@@ -104,7 +104,7 @@ fn validate_owner(
104104
}
105105

106106
if owner_account_info.data_len() == Multisig::LEN
107-
&& owner_account_info.owner() == &TOKEN_PROGRAM_ID
107+
&& owner_account_info.is_owned_by(&TOKEN_PROGRAM_ID)
108108
{
109109
// SAFETY: the caller guarantees that there are no mutable borrows of `owner_account_info`
110110
// account data and the `load` validates that the account is initialized; additionally,

0 commit comments

Comments
 (0)