|
| 1 | +#![allow(unused_variables, unused_imports)] |
1 | 2 | use {
|
2 | 3 | crate::{
|
3 | 4 | accounts::{
|
@@ -116,23 +117,23 @@ fn reserve_new_price_feed_index<'a>(
|
116 | 117 | ) -> Result<u32, ProgramError> {
|
117 | 118 | if permissions_account.data_len() < PermissionAccount::MIN_SIZE_WITH_LAST_FEED_INDEX {
|
118 | 119 | let new_size = PermissionAccount::MIN_SIZE_WITH_LAST_FEED_INDEX;
|
119 |
| - let rent = Rent::get()?; |
120 |
| - let new_minimum_balance = rent.minimum_balance(new_size); |
121 |
| - let lamports_diff = new_minimum_balance.saturating_sub(permissions_account.lamports()); |
122 |
| - if lamports_diff > 0 { |
123 |
| - invoke( |
124 |
| - &system_instruction::transfer( |
125 |
| - funding_account.key, |
126 |
| - permissions_account.key, |
127 |
| - lamports_diff, |
128 |
| - ), |
129 |
| - &[ |
130 |
| - funding_account.clone(), |
131 |
| - permissions_account.clone(), |
132 |
| - system_program.clone(), |
133 |
| - ], |
134 |
| - )?; |
135 |
| - } |
| 120 | + // let rent = Rent::get()?; |
| 121 | + // let new_minimum_balance = rent.minimum_balance(new_size); |
| 122 | + // let lamports_diff = new_minimum_balance.saturating_sub(permissions_account.lamports()); |
| 123 | + // if lamports_diff > 0 { |
| 124 | + // invoke( |
| 125 | + // &system_instruction::transfer( |
| 126 | + // funding_account.key, |
| 127 | + // permissions_account.key, |
| 128 | + // lamports_diff, |
| 129 | + // ), |
| 130 | + // &[ |
| 131 | + // funding_account.clone(), |
| 132 | + // permissions_account.clone(), |
| 133 | + // system_program.clone(), |
| 134 | + // ], |
| 135 | + // )?; |
| 136 | + // } |
136 | 137 |
|
137 | 138 | permissions_account.realloc(new_size, true)?;
|
138 | 139 | let mut header = load_account_as_mut::<AccountHeader>(permissions_account)?;
|
|
0 commit comments