Skip to content

Commit

Permalink
Merge pull request #367 from OriginProtocol/shah/fix-oracle-triggers
Browse files Browse the repository at this point in the history
Fix oracle triggers
  • Loading branch information
shahthepro authored Aug 28, 2023
2 parents 6157a7f + 6f0804e commit 27764f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
6 changes: 2 additions & 4 deletions eagleproject/core/blockchain/harvest/snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
origin_token_non_rebasing_supply,
priceUnitMint,
priceUnitRedeem,
priceUSDMint,
priceUSDRedeem,
rebasing_credits_per_token,
strategyCheckBalance,
story_staking_total_supply,
Expand Down Expand Up @@ -267,7 +265,7 @@ def build_asset_block(symbol, block_number, project = OriginTokens.OUSD):
if ora_tok_usd_min < 0:
try:
ora_tok_usd_min = (
priceUSDMint(OUSD_VAULT, CONTRACT_FOR_SYMBOL[symbol], block_number)
priceUnitMint(OUSD_VAULT, CONTRACT_FOR_SYMBOL[symbol], block_number)
if symbol in OUSD_BACKING_ASSETS
else 0
)
Expand All @@ -277,7 +275,7 @@ def build_asset_block(symbol, block_number, project = OriginTokens.OUSD):
if ora_tok_usd_max < 0:
try:
ora_tok_usd_max = (
priceUSDRedeem(OUSD_VAULT, CONTRACT_FOR_SYMBOL[symbol], block_number)
priceUnitRedeem(OUSD_VAULT, CONTRACT_FOR_SYMBOL[symbol], block_number)
if symbol in OUSD_BACKING_ASSETS
else 0
)
Expand Down
5 changes: 0 additions & 5 deletions eagleproject/notify/triggers/vault_oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
def get_oracle_prices(symbol, vault=OUSD_VAULT):
""" Get min/max price for a token """
address = CONTRACT_FOR_SYMBOL[symbol]

if vault == OUSD_VAULT:
# Rel: https://github.com/OriginProtocol/origin-dollar/issues/1368
return (priceUSDRedeem(vault, address), priceUSDMint(vault, address))

return (priceUnitRedeem(vault, address), priceUnitMint(vault, address))


Expand Down

0 comments on commit 27764f7

Please sign in to comment.