From dc5a7bcda58147c0c795c3654ba5dae0006ea4d1 Mon Sep 17 00:00:00 2001 From: levisyin Date: Wed, 22 Nov 2023 16:53:22 +0800 Subject: [PATCH 1/2] refactor: using pool.GetPoolDenoms directly --- x/poolmanager/router.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/x/poolmanager/router.go b/x/poolmanager/router.go index 015a20ba8b1..42723891235 100644 --- a/x/poolmanager/router.go +++ b/x/poolmanager/router.go @@ -563,10 +563,7 @@ func (k Keeper) ListPoolsByDenom( var poolsByDenom []types.PoolI for _, pool := range currentModulePools { - poolDenoms, err := poolModule.GetPoolDenoms(ctx, pool.GetId()) - if err != nil { - return nil, err - } + poolDenoms := pool.GetPoolDenoms(ctx) if osmoutils.Contains(poolDenoms, denom) { poolsByDenom = append(poolsByDenom, pool) } From e11dbf78d76e4e6c53e63167d7f98f48b43454c1 Mon Sep 17 00:00:00 2001 From: levisyin Date: Wed, 22 Nov 2023 17:02:03 +0800 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 353a0dd17da..98ee0fd2bfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#6861](https://github.com/osmosis-labs/osmosis/pull/6861) Protorev address added to reduced taker fee whitelist * [#6884](https://github.com/osmosis-labs/osmosis/pull/6884) Improve ListPoolsByDenom function filter denom logic * [#6890](https://github.com/osmosis-labs/osmosis/pull/6890) Enable arb filter for affiliate swap contract +* [#6884](https://github.com/osmosis-labs/osmosis/pull/6914) Update ListPoolsByDenom function by using pool.GetPoolDenoms to filter denom directly ### API Breaks