Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Commit 44ae258

Browse files
authored
solana: use custody token amount for repayment (#128)
Co-authored-by: A5 Pickle <[email protected]>
1 parent 307cc28 commit 44ae258

File tree

1 file changed

+2
-2
lines changed
  • solana/programs/matching-engine/src/processor/auction/settle

1 file changed

+2
-2
lines changed

solana/programs/matching-engine/src/processor/auction/settle/complete.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub struct SettleAuctionComplete<'info> {
5252
],
5353
bump,
5454
)]
55-
prepared_custody_token: UncheckedAccount<'info>,
55+
prepared_custody_token: Account<'info, token::TokenAccount>,
5656

5757
#[account(
5858
mut,
@@ -101,7 +101,7 @@ fn handle_settle_auction_complete(
101101
];
102102

103103
// We may deduct from this account if the winning participant was penalized.
104-
let mut repayment = ctx.accounts.auction.info.as_ref().unwrap().amount_in;
104+
let mut repayment = ctx.accounts.prepared_custody_token.amount;
105105

106106
match execute_penalty {
107107
None => {

0 commit comments

Comments
 (0)