@@ -37,37 +37,14 @@ fn test_make_offer_succeeds() {
37
37
make_offer_accounts,
38
38
) ;
39
39
40
- send_transaction_from_instructions (
40
+ let result = send_transaction_from_instructions (
41
41
& mut test_environment. litesvm ,
42
42
vec ! [ make_offer_instruction] ,
43
43
& [ & test_environment. alice ] ,
44
44
& test_environment. alice . pubkey ( ) ,
45
- )
46
- . unwrap ( ) ;
47
-
48
- let make_offer_accounts_with_existing_offer_id = build_make_offer_accounts (
49
- test_environment. bob . pubkey ( ) ,
50
- test_environment. token_mint_a . pubkey ( ) ,
51
- test_environment. token_mint_b . pubkey ( ) ,
52
- test_environment. bob_token_account_a ,
53
- offer_account,
54
- vault,
55
- ) ;
56
-
57
- let make_offer_instruction_with_existing_offer_id = build_make_offer_instruction (
58
- offer_id,
59
- 1 * TOKEN_A ,
60
- 1 * TOKEN_B ,
61
- make_offer_accounts_with_existing_offer_id,
62
- ) ;
63
-
64
- let result = send_transaction_from_instructions (
65
- & mut test_environment. litesvm ,
66
- vec ! [ make_offer_instruction_with_existing_offer_id] ,
67
- & [ & test_environment. bob ] ,
68
- & test_environment. bob . pubkey ( ) ,
69
45
) ;
70
- assert ! ( result. is_err( ) , "Second offer with same ID should fail" ) ;
46
+
47
+ assert ! ( result. is_ok( ) , "Valid offer should succeed" ) ;
71
48
}
72
49
73
50
#[ test]
0 commit comments