@@ -99,32 +99,33 @@ fn handle_execute_fast_order<'info>(
99
99
// init auction fee. The executor will get these funds instead.
100
100
//
101
101
// We check that this is a legitimate token account.
102
- if utils:: checked_deserialize_token_account ( initial_offer_token, & custody_token . mint )
102
+ if utils:: checked_deserialize_token_account ( initial_offer_token, & common :: USDC_MINT )
103
103
. is_some ( )
104
- && best_offer_token. key ( ) != initial_offer_token. key ( )
105
104
{
106
- // Pay the auction initiator their fee.
107
- token:: transfer (
108
- CpiContext :: new_with_signer (
109
- token_program. to_account_info ( ) ,
110
- token:: Transfer {
111
- from : custody_token. to_account_info ( ) ,
112
- to : initial_offer_token. to_account_info ( ) ,
113
- authority : auction. to_account_info ( ) ,
114
- } ,
115
- & [ auction_signer_seeds] ,
116
- ) ,
117
- init_auction_fee,
118
- ) ?;
105
+ if best_offer_token. key ( ) != initial_offer_token. key ( ) {
106
+ // Pay the auction initiator their fee.
107
+ token:: transfer (
108
+ CpiContext :: new_with_signer (
109
+ token_program. to_account_info ( ) ,
110
+ token:: Transfer {
111
+ from : custody_token. to_account_info ( ) ,
112
+ to : initial_offer_token. to_account_info ( ) ,
113
+ authority : auction. to_account_info ( ) ,
114
+ } ,
115
+ & [ auction_signer_seeds] ,
116
+ ) ,
117
+ init_auction_fee,
118
+ ) ?;
119
119
120
- // Because the initial offer token was paid this fee, we account for it here.
121
- remaining_custodied_amount =
122
- remaining_custodied_amount. saturating_sub ( init_auction_fee) ;
123
- } else {
124
- // Add it to the reimbursement.
125
- deposit_and_fee = deposit_and_fee
126
- . checked_add ( init_auction_fee)
127
- . ok_or_else ( || MatchingEngineError :: U64Overflow ) ?;
120
+ // Because the initial offer token was paid this fee, we account for it here.
121
+ remaining_custodied_amount =
122
+ remaining_custodied_amount. saturating_sub ( init_auction_fee) ;
123
+ } else {
124
+ // Add it to the reimbursement.
125
+ deposit_and_fee = deposit_and_fee
126
+ . checked_add ( init_auction_fee)
127
+ . ok_or_else ( || MatchingEngineError :: U64Overflow ) ?;
128
+ }
128
129
}
129
130
130
131
// Return the security deposit and the fee to the highest bidder.
@@ -152,7 +153,7 @@ fn handle_execute_fast_order<'info>(
152
153
// Otherwise, send the deposit and fee to the best offer token. If the best offer token
153
154
// doesn't exist at this point (which would be unusual), we will reserve these funds
154
155
// for the executor token.
155
- if utils:: checked_deserialize_token_account ( best_offer_token, & custody_token . mint )
156
+ if utils:: checked_deserialize_token_account ( best_offer_token, & common :: USDC_MINT )
156
157
. is_some ( )
157
158
{
158
159
token:: transfer (
0 commit comments