@@ -184,8 +184,7 @@ pub mod seer_v2 {
184
184
fn toggle_yang_price_conversion (ref self : ContractState , yang : ContractAddress ) {
185
185
self . access_control. assert_has_role (seer_roles :: TOGGLE_YANG_PRICE_CONVERSION );
186
186
187
- let old_price_conversion = self . price_conversions. read (yang );
188
- let new_price_conversion = match old_price_conversion {
187
+ let new_price_conversion = match self . price_conversions. read (yang ) {
189
188
// toggling to vault type
190
189
PriceConversion :: None => {
191
190
assert (
@@ -256,7 +255,7 @@ pub mod seer_v2 {
256
255
}
257
256
258
257
let price_conversion = self . price_conversions. read (* yang );
259
- let target_asset = match price_conversion {
258
+ let asset = match price_conversion {
260
259
PriceConversion :: None => * yang ,
261
260
PriceConversion :: Vault (info ) => info . asset,
262
261
};
@@ -275,7 +274,7 @@ pub mod seer_v2 {
275
274
// in a try-catch block so that an exception does not
276
275
// prevent all other price updates
277
276
278
- match oracle . fetch_price (target_asset ) {
277
+ match oracle . fetch_price (asset ) {
279
278
Result :: Ok (oracle_price ) => {
280
279
let asset_price : Wad = match price_conversion {
281
280
PriceConversion :: None => oracle_price ,
0 commit comments