From bc5e8676f493ee4dc853d1aaedafa4533dfd1451 Mon Sep 17 00:00:00 2001 From: Benjamin DENEUX Date: Wed, 18 Jan 2023 16:29:29 +0100 Subject: [PATCH] fix(logic): sort result for locked coin denom --- x/logic/predicate/util.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/logic/predicate/util.go b/x/logic/predicate/util.go index ff92b392..fb6c33da 100644 --- a/x/logic/predicate/util.go +++ b/x/logic/predicate/util.go @@ -32,7 +32,8 @@ func SpendableCoinsSorted(sdkContext sdk.Context, bankKeeper types.BankKeeper, b // LockedCoinsSorted returns the list of spendable coins for the given address, sorted by coin denomination. func LockedCoinsSorted(sdkContext sdk.Context, bankKeeper types.BankKeeper, bech32Addr sdk.AccAddress) sdk.Coins { fetchedBalances := bankKeeper.LockedCoins(sdkContext, bech32Addr) - return BalancesSorted(fetchedBalances) + SortBalances(fetchedBalances) + return fetchedBalances } // CoinsToTerm converts the given coins to a term of the form: