Skip to content

Commit c31aaf1

Browse files
authored
Merge pull request #40 from Flawm/pNFT
2 parents 79bb77d + 13c4aa3 commit c31aaf1

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

program/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

program/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hpl-reward-center"
3-
version = "0.2.4"
3+
version = "0.2.5"
44
edition = "2021"
55
description = "Reward buyers and sellers of NFTs with spl tokens"
66
authors = ["Holaplex Developers <[email protected]>"]

program/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ pub mod reward_center {
4545
withdraw::reward_center::handler(ctx, withdraw_reward_center_funds_params)
4646
}
4747

48-
pub fn create_listing(
49-
ctx: Context<CreateListing>,
48+
pub fn create_listing<'info>(
49+
ctx: Context<'_, '_, '_, 'info, CreateListing<'info>>,
5050
create_listing_params: CreateListingParams,
5151
) -> Result<()> {
5252
listings::create::handler(ctx, create_listing_params)
@@ -59,7 +59,9 @@ pub mod reward_center {
5959
listings::update::handler(ctx, update_listing_params)
6060
}
6161

62-
pub fn close_listing(ctx: Context<CloseListing>) -> Result<()> {
62+
pub fn close_listing<'info>(
63+
ctx: Context<'_, '_, '_, 'info, CloseListing<'info>>,
64+
) -> Result<()> {
6365
listings::close::handler(ctx)
6466
}
6567

program/src/listings/buy/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ pub struct BuyListing<'info> {
9696

9797
/// CHECK: assertion with mpl_auction_house assert_metadata_valid
9898
/// Metaplex metadata account decorating SPL mint account.
99+
#[account(mut)]
99100
pub metadata: UncheckedAccount<'info>,
100101

101102
/// Auction House treasury mint account.

program/src/listings/close/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pub struct CloseListing<'info> {
110110
pub auction_house_program: Program<'info, AuctionHouseProgram>,
111111
}
112112

113-
pub fn handler(ctx: Context<CloseListing>) -> Result<()> {
113+
pub fn handler<'info>(ctx: Context<'_, '_, '_, 'info, CloseListing<'info>>) -> Result<()> {
114114
let reward_center = &ctx.accounts.reward_center;
115115
let auction_house = &ctx.accounts.auction_house;
116116
let metadata = &ctx.accounts.metadata;
@@ -150,7 +150,7 @@ pub fn handler(ctx: Context<CloseListing>) -> Result<()> {
150150
accounts: cancel_listing_ctx_accounts,
151151
instruction_data: close_listing_params.data(),
152152
auctioneer_authority: ctx.accounts.reward_center.key(),
153-
remaining_accounts: None,
153+
remaining_accounts: Some(ctx.remaining_accounts),
154154
});
155155

156156
invoke_signed(

program/src/listings/create/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ pub struct CreateListing<'info> {
176176
pub rent: Sysvar<'info, Rent>,
177177
}
178178

179-
pub fn handler(
180-
ctx: Context<CreateListing>,
179+
pub fn handler<'info>(
180+
ctx: Context<'_, '_, '_, 'info, CreateListing<'info>>,
181181
CreateListingParams {
182182
token_size,
183183
trade_state_bump,
@@ -244,7 +244,7 @@ pub fn handler(
244244
accounts: create_listing_ctx_accounts,
245245
instruction_data: create_listing_params.data(),
246246
auctioneer_authority: ctx.accounts.reward_center.key(),
247-
remaining_accounts: None,
247+
remaining_accounts: Some(ctx.remaining_accounts),
248248
});
249249

250250
invoke_signed(

0 commit comments

Comments
 (0)