@@ -114,47 +114,6 @@ pub async fn test_close_fast_market_order_fallback() {
114
114
. await ;
115
115
}
116
116
117
- /// Test that the close fast market order account works correctly for the fallback instruction
118
- #[ tokio:: test]
119
- pub async fn test_close_fast_market_order_fallback_with_custom_refund_recipient ( ) {
120
- let vaa_args = vec ! [ VaaArgs {
121
- post_vaa: false ,
122
- ..VaaArgs :: default ( )
123
- } ] ;
124
- let ( testing_context, mut test_context) = setup_environment (
125
- ShimMode :: VerifyAndPostSignature ,
126
- TransferDirection :: FromArbitrumToEthereum ,
127
- Some ( vaa_args) ,
128
- )
129
- . await ;
130
- let solver_1 = & testing_context. testing_actors . solvers [ 1 ] . clone ( ) ;
131
- let solver_1_balance_before = solver_1. get_lamport_balance ( & mut test_context) . await ;
132
- let testing_engine = TestingEngine :: new ( testing_context) . await ;
133
- let instruction_triggers = vec ! [
134
- InstructionTrigger :: InitializeProgram ( InitializeInstructionConfig :: default ( ) ) ,
135
- InstructionTrigger :: CreateCctpRouterEndpoints (
136
- CreateCctpRouterEndpointsInstructionConfig :: default ( ) ,
137
- ) ,
138
- InstructionTrigger :: InitializeFastMarketOrderShim (
139
- InitializeFastMarketOrderShimInstructionConfig {
140
- close_account_refund_recipient: Some ( solver_1. pubkey( ) ) ,
141
- ..InitializeFastMarketOrderShimInstructionConfig :: default ( )
142
- } ,
143
- ) ,
144
- InstructionTrigger :: CloseFastMarketOrderShim ( CloseFastMarketOrderShimInstructionConfig {
145
- close_account_refund_recipient_keypair: Some ( solver_1. keypair( ) ) ,
146
- ..CloseFastMarketOrderShimInstructionConfig :: default ( )
147
- } ) ,
148
- ] ;
149
- testing_engine
150
- . execute ( & mut test_context, instruction_triggers, None )
151
- . await ;
152
- let solver_1_balance_after = solver_1. get_lamport_balance ( & mut test_context) . await ;
153
- assert ! (
154
- solver_1_balance_after > solver_1_balance_before,
155
- "Solver 1 balance after is not greater than balance before"
156
- ) ;
157
- }
158
117
159
118
/*
160
119
Sad path tests Section
@@ -332,7 +291,6 @@ pub async fn test_multiple_fast_market_orders_can_be_opened_and_closed_by_differ
332
291
)
333
292
. await ;
334
293
let solver_1 = testing_context. testing_actors . solvers [ 1 ] . clone ( ) ;
335
- let solver_2 = testing_context. testing_actors . solvers [ 2 ] . clone ( ) ;
336
294
let testing_engine = TestingEngine :: new ( testing_context) . await ;
337
295
let instruction_triggers = vec ! [
338
296
InstructionTrigger :: InitializeProgram ( InitializeInstructionConfig :: default ( ) ) ,
@@ -357,6 +315,7 @@ pub async fn test_multiple_fast_market_orders_can_be_opened_and_closed_by_differ
357
315
let instruction_triggers_1 = vec ! [ InstructionTrigger :: InitializeFastMarketOrderShim (
358
316
InitializeFastMarketOrderShimInstructionConfig {
359
317
fast_market_order_id: 1 ,
318
+ payer_signer: Some ( solver_1. keypair( ) ) ,
360
319
close_account_refund_recipient: Some ( solver_1. pubkey( ) ) ,
361
320
..InitializeFastMarketOrderShimInstructionConfig :: default ( )
362
321
} ,
@@ -377,13 +336,6 @@ pub async fn test_multiple_fast_market_orders_can_be_opened_and_closed_by_differ
377
336
fast_market_order_address: Some ( fast_market_order_0_pubkey) ,
378
337
..CloseFastMarketOrderShimInstructionConfig :: default ( )
379
338
} ) ,
380
- InstructionTrigger :: InitializeFastMarketOrderShim (
381
- InitializeFastMarketOrderShimInstructionConfig {
382
- fast_market_order_id: 2 ,
383
- close_account_refund_recipient: Some ( solver_2. pubkey( ) ) ,
384
- ..InitializeFastMarketOrderShimInstructionConfig :: default ( )
385
- } ,
386
- ) ,
387
339
] ;
388
340
let current_state = testing_engine
389
341
. execute (
@@ -398,12 +350,6 @@ pub async fn test_multiple_fast_market_orders_can_be_opened_and_closed_by_differ
398
350
. fast_market_order_address ;
399
351
let instruction_triggers_3 = vec ! [
400
352
InstructionTrigger :: CloseFastMarketOrderShim ( CloseFastMarketOrderShimInstructionConfig {
401
- close_account_refund_recipient_keypair: Some ( solver_2. keypair( ) ) ,
402
- fast_market_order_address: Some ( fast_market_order_2_pubkey) ,
403
- ..CloseFastMarketOrderShimInstructionConfig :: default ( )
404
- } ) ,
405
- InstructionTrigger :: CloseFastMarketOrderShim ( CloseFastMarketOrderShimInstructionConfig {
406
- close_account_refund_recipient_keypair: Some ( solver_1. keypair( ) ) ,
407
353
fast_market_order_address: Some ( fast_market_order_1_pubkey) ,
408
354
..CloseFastMarketOrderShimInstructionConfig :: default ( )
409
355
} ) ,
0 commit comments