Skip to content

Commit

Permalink
Do not error on spot price error in results, return zero instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
p0mvn committed Mar 13, 2024
1 parent d394719 commit 9b536bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## v0.8.2

Do not error on spot price error in results, return zero instead.

## v0.8.1

Deprioritize non-transmuter pools
Expand Down
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"pools": {
"transmuter-code-ids": [148, 254],
"general-cosmwasm-code-ids": [503, 572]
"general-cosmwasm-code-ids": [503, 572, 580]
},
"pricing":{
"cache-expiry-ms": 2000,
Expand Down
2 changes: 1 addition & 1 deletion router/usecase/route/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (r RouteImpl) PrepareResultPools(ctx context.Context, tokenIn sdk.Coin) ([]
// Compute spot price before swap.
spotPriceInOverOut, err := pool.CalcSpotPrice(ctx, pool.GetTokenOutDenom(), tokenIn.Denom)
if err != nil {
return nil, osmomath.Dec{}, osmomath.Dec{}, err
spotPriceInOverOut = osmomath.ZeroBigDec()
}

// Charge taker fee
Expand Down

0 comments on commit 9b536bc

Please sign in to comment.