Skip to content

Commit 24e831a

Browse files
author
Mwaa Joseph
committed
Update functionality based on latest poseidon lib changes
1 parent 97ef45f commit 24e831a

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

basics/favorites/poseidon/programs/favorites-program/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ pub mod favorites_program {
1818
}
1919
#[derive(Accounts)]
2020
pub struct SetFavoritesContext<'info> {
21-
#[account(mut)]
22-
pub payer: Signer<'info>,
2321
#[account(
2422
init,
2523
payer = payer,
@@ -29,6 +27,8 @@ pub struct SetFavoritesContext<'info> {
2927
bump,
3028
)]
3129
pub favorites: Account<'info, Favorites>,
30+
#[account(mut)]
31+
pub payer: Signer<'info>,
3232
pub system_program: Program<'info, System>,
3333
}
3434
#[account]

basics/favorites/poseidon/ts-programs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
"author": "",
1111
"license": "ISC",
1212
"dependencies": {
13-
"@solanaturbine/poseidon": "^0.0.6"
13+
"@solanaturbine/poseidon": "0.0.10"
1414
}
1515
}

basics/favorites/poseidon/ts-programs/pnpm-lock.yaml

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

basics/favorites/poseidon/ts-programs/src/favoritesProgram.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { Account, Pubkey, Result, Signer, String, Vec, u8, u64 } from '@solanatu
44
export default class FavoritesProgram {
55
static PROGRAM_ID = new Pubkey('HMYL9ABJz8fpw6XUnkRAYVsXor4JxosiZqHBd38ZgCqS');
66

7-
setFavorites(favorites: Favorites, payer: Signer, number: u64, color: String<8>, hobbies: Vec<String<8>, 5>): Result {
8-
favorites.derive(['favorites', payer.key]).init();
7+
setFavorites(favorites: Favorites, payer: Signer, number: u64, color: String<7>, hobbies: Vec<String<7>, 5>): Result {
8+
favorites.derive(['favorites', payer.key]).init(payer);
99
favorites.number = number;
1010
favorites.color = color;
1111
favorites.hobbies = hobbies;

0 commit comments

Comments
 (0)