@@ -177,7 +177,7 @@ impl PythReceiver {
177
177
update_data : Vec < Vec < u8 > > ,
178
178
) -> Result < ( ) , PythReceiverError > {
179
179
for data in & update_data {
180
- self . update_price_feeds_internal ( data. clone ( ) , Vec :: new ( ) , 0 , 0 , false ) ?;
180
+ self . update_price_feeds_internal ( data. clone ( ) , 0 , 0 , false ) ?;
181
181
}
182
182
183
183
let total_fee = self . get_update_fee ( update_data) ?;
@@ -221,16 +221,15 @@ impl PythReceiver {
221
221
fn update_price_feeds_internal (
222
222
& mut self ,
223
223
update_data : Vec < u8 > ,
224
- _price_ids : Vec < [ u8 ; 32 ] > ,
225
224
min_publish_time : u64 ,
226
225
max_publish_time : u64 ,
227
- _unique : bool ,
226
+ unique : bool ,
228
227
) -> Result < Vec < ( [ u8 ; 32 ] , PriceInfoReturn ) > , PythReceiverError > {
229
228
let price_pairs = self . parse_price_feed_updates_internal (
230
229
update_data,
231
230
min_publish_time,
232
231
max_publish_time,
233
- false , // check_uniqueness
232
+ unique ,
234
233
) ?;
235
234
236
235
for ( price_id, price_return) in price_pairs. clone ( ) {
@@ -266,12 +265,8 @@ impl PythReceiver {
266
265
}
267
266
}
268
267
}
269
- Ok ( self . get_total_fee ( total_num_updates) )
270
- }
271
-
272
- fn get_total_fee ( & self , total_num_updates : u64 ) -> U256 {
273
- U256 :: from ( total_num_updates) . saturating_mul ( self . single_update_fee_in_wei . get ( ) )
274
- + self . transaction_fee_in_wei . get ( )
268
+ Ok ( U256 :: from ( total_num_updates) . saturating_mul ( self . single_update_fee_in_wei . get ( ) )
269
+ + self . transaction_fee_in_wei . get ( ) )
275
270
}
276
271
277
272
pub fn get_twap_update_fee ( & self , _update_data : Vec < Vec < u8 > > ) -> U256 {
@@ -312,7 +307,6 @@ impl PythReceiver {
312
307
if store_updates_if_fresh {
313
308
all_parsed_price_pairs. extend ( self . update_price_feeds_internal (
314
309
data. clone ( ) ,
315
- price_ids. clone ( ) ,
316
310
min_allowed_publish_time,
317
311
max_allowed_publish_time,
318
312
check_uniqueness,
0 commit comments