Skip to content

Commit

Permalink
revert astroport spot price
Browse files Browse the repository at this point in the history
  • Loading branch information
p0mvn committed Apr 9, 2024
1 parent c839193 commit 8dca06c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions router/usecase/pools/routable_cw_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,7 @@ 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{
request := msg.SpotPriceQueryMsg{
SpotPrice: msg.SpotPrice{
QuoteAssetDenom: quoteDenom,
BaseAssetDenom: baseDenom,
Expand Down

0 comments on commit 8dca06c

Please sign in to comment.