Skip to content

Commit

Permalink
revert astroport hot fix (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
p0mvn authored Apr 8, 2024
1 parent b02994d commit b83975b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## v0.13.2

Revert Astroport spot price hot fix.
https://wallet.keplr.app/chains/osmosis/proposals/762

## v0.13.1

* [#160](https://github.com/osmosis-labs/sqs/pull/160) Custom sampling rate per endpoint.
Expand Down
8 changes: 0 additions & 8 deletions router/usecase/pools/routable_cw_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import (
)

const (
astroportPCLCodeID = 580

// placeholder for the code id of the pool that is not a cosm wasm pool
notCosmWasmPoolCodeID = 0
)
Expand Down Expand Up @@ -115,12 +113,6 @@ func (r *routableCosmWasmPoolImpl) SetTokenOutDenom(tokenOutDenom string) {
// CalcSpotPrice implements sqsdomain.RoutablePool.
func (r *routableCosmWasmPoolImpl) CalcSpotPrice(ctx context.Context, baseDenom string, quoteDenom string) (osmomath.BigDec, error) {
var request msg.SpotPriceQueryMsg
// HACK:
// AStroport PCL pool has the quote and base asset denoms reversed
// This is a temporary hot fix until the contract is migrated
if r.ChainPool.CodeId == astroportPCLCodeID {
baseDenom, quoteDenom = quoteDenom, baseDenom
}

request = msg.SpotPriceQueryMsg{
SpotPrice: msg.SpotPrice{
Expand Down

0 comments on commit b83975b

Please sign in to comment.