File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -622,6 +622,10 @@ pub trait SafePriceViewModule:
622622 let left_weight = right_observation. recording_timestamp - target_timestamp;
623623 let right_weight = target_timestamp - left_observation. recording_timestamp ;
624624
625+ if left_weight == 0 && right_weight == 0 {
626+ return left_observation. recording_round ;
627+ }
628+
625629 weighted_average (
626630 left_observation. recording_round ,
627631 left_weight,
Original file line number Diff line number Diff line change @@ -365,6 +365,7 @@ pub trait Router:
365365 self . default_safe_price_rounds_offset ( ) . set ( new_offset) ;
366366 }
367367
368+ #[ only_owner]
368369 #[ endpoint( claimDeveloperRewardsPairs) ]
369370 fn claim_developer_rewards_pairs ( & self , pairs : MultiValueEncoded < ManagedAddress > ) {
370371 let sc_address = self . blockchain ( ) . get_sc_address ( ) ;
@@ -380,7 +381,7 @@ pub trait Router:
380381 require ! ( egld_balance_after > egld_balance_before, "No EGLD received" ) ;
381382 let total_egld_received = egld_balance_after - egld_balance_before;
382383
383- let owner = self . blockchain ( ) . get_caller ( ) ;
384+ let owner = self . blockchain ( ) . get_owner_address ( ) ;
384385 self . send ( ) . direct_egld ( & owner, & total_egld_received) ;
385386 }
386387
You can’t perform that action at this time.
0 commit comments