Skip to content

Commit 44c55b0

Browse files
committed
rewrite funcs in line with bound considerations
1 parent 6e8227e commit 44c55b0

File tree

3 files changed

+390
-149
lines changed

3 files changed

+390
-149
lines changed

pyth-sdk/src/error.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
use thiserror::Error;
22

33
#[derive(Error, Debug, Copy, Clone, PartialEq)]
4-
pub enum LiquidityOracleError {
5-
#[error("deposits exceeds max depositable")]
6-
ExceedsMaxDeposits,
7-
#[error("initial discount rate should not be greater than final discount rate")]
4+
pub enum OracleError {
5+
#[error("initial endpoint should not be greater than or equal to final endpoint")]
6+
InitialEndpointExceedsFinalEndpoint,
7+
#[error("initial discount should not exceed final discount, for collateral valuation")]
88
InitialDiscountExceedsFinalDiscount,
99
#[error("final discount rate should not be greater than the discount precision")]
1010
FinalDiscountExceedsPrecision,
11+
#[error("initial premium should not exceed final premium, for borrow valuation")]
12+
InitialPremiumExceedsFinalPremium,
1113
#[error("None encountered")]
1214
NoneEncountered,
1315
#[error("i64 try from error")]

0 commit comments

Comments
 (0)