@@ -27,6 +27,8 @@ mod upd_permissions;
2727mod upd_price;
2828mod upd_product;
2929
30+ #[ cfg( feature = "price_v2_resize" ) ]
31+ pub use resize_price_account:: resize_price_account;
3032pub use {
3133 add_price:: add_price,
3234 add_product:: add_product,
@@ -36,7 +38,6 @@ pub use {
3638 del_publisher:: del_publisher,
3739 init_mapping:: init_mapping,
3840 init_price:: init_price,
39- resize_price_account:: resize_price_account,
4041 set_min_pub:: set_min_pub,
4142 upd_permissions:: upd_permissions,
4243 upd_price:: {
@@ -71,7 +72,18 @@ pub fn process_instruction(
7172 UpdTest => Err ( OracleError :: UnrecognizedInstruction . into ( ) ) ,
7273 SetMinPub => set_min_pub ( program_id, accounts, instruction_data) ,
7374 UpdPriceNoFailOnError => upd_price_no_fail_on_error ( program_id, accounts, instruction_data) ,
74- ResizePriceAccount => resize_price_account ( program_id, accounts, instruction_data) ,
75+ ResizePriceAccount => {
76+ #[ cfg( feature = "price_v2_resize" ) ]
77+ {
78+ resize_price_account ( program_id, accounts, instruction_data)
79+ }
80+
81+ #[ cfg( not( feature = "price_v2_resize" ) ) ]
82+ {
83+ solana_program:: msg!( "Oracle built with price_v2_resize disabled. Bailing out!" ) ;
84+ Err ( OracleError :: UnrecognizedInstruction . into ( ) )
85+ }
86+ }
7587 DelPrice => del_price ( program_id, accounts, instruction_data) ,
7688 DelProduct => del_product ( program_id, accounts, instruction_data) ,
7789 UpdPermissions => upd_permissions ( program_id, accounts, instruction_data) ,
0 commit comments