From b83975ba525e1c6f0469b645cadb905e19a9e090 Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 8 Apr 2024 14:42:48 -0600 Subject: [PATCH] revert astroport hot fix (#161) --- CHANGELOG.md | 5 +++++ router/usecase/pools/routable_cw_pool.go | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dff687c01..eec89f506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/router/usecase/pools/routable_cw_pool.go b/router/usecase/pools/routable_cw_pool.go index ecc48be30..483b63ec1 100644 --- a/router/usecase/pools/routable_cw_pool.go +++ b/router/usecase/pools/routable_cw_pool.go @@ -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 ) @@ -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{