Skip to content

Commit

Permalink
add write off to oracle valuation
Browse files Browse the repository at this point in the history
  • Loading branch information
lemunozm committed May 9, 2023
1 parent 8c9a059 commit 77efafc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pallets/loans-ref/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ impl<T: Config> ActiveLoan<T> {
))?
.0;

Ok(oracle.quantity.ensure_mul(price)?)
let value = oracle.quantity.ensure_mul(price)?;
Ok(self.write_off_status.write_down(value)?)
}
}
}
Expand Down

0 comments on commit 77efafc

Please sign in to comment.