Skip to content

Commit e81c424

Browse files
committed
fix: hardcode price for curve stable pool 0x49
1 parent 70ddfa1 commit e81c424

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

repository/token.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ func (repo *Repository) getValueInCurrency(blockNum int64, oracle schemas.PriceO
9696
{ // one token is redstone token
9797
tokenPrice := repo.GetRedStonePrice(blockNum, oracle, token)
9898
currencyPrice := repo.GetRedStonePrice(blockNum, oracle, currency)
99-
if tokenPrice != nil || currencyPrice != nil {
100-
if tokenPrice == nil {
99+
if tokenPrice != nil || currencyPrice != nil || token == "0xEcb0F0d68C19BdAaDAEbE24f6752A4Db34e2c2cb" {
100+
if tokenPrice == nil && token == "0xEcb0F0d68C19BdAaDAEbE24f6752A4Db34e2c2cb" {
101+
tokenPrice = big.NewInt(100_000_000)
102+
} else if tokenPrice == nil {
101103
tokenPrice, err = poContract.GetPrice(opts, common.HexToAddress(token))
102104
if err != nil {
103105
log.Fatalf("%v %s %d %s %s at block %d. %s", err, oracle, amount, token, currencyAddr, blockNum, currency)

0 commit comments

Comments
 (0)