Displaying tokens ordered ascending by symbol
This commit is contained in:
parent
7444963fec
commit
a655d3657b
|
@ -7,7 +7,7 @@ import { type Safe } from '~/routes/safe/store/model/safe'
|
||||||
import { type Owner } from '~/routes/safe/store/model/owner'
|
import { type Owner } from '~/routes/safe/store/model/owner'
|
||||||
import { type GlobalState } from '~/store'
|
import { type GlobalState } from '~/store'
|
||||||
import { sameAddress } from '~/logic/wallets/ethAddresses'
|
import { sameAddress } from '~/logic/wallets/ethAddresses'
|
||||||
import { activeTokensSelector, tokenListSelector } from '~/routes/tokens/store/selectors'
|
import { activeTokensSelector, orderedTokenListSelector } from '~/routes/tokens/store/selectors'
|
||||||
import { type Token } from '~/routes/tokens/store/model/token'
|
import { type Token } from '~/routes/tokens/store/model/token'
|
||||||
import { safeParamAddressSelector } from '../store/selectors'
|
import { safeParamAddressSelector } from '../store/selectors'
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ export const grantedSelector: Selector<GlobalState, RouterProps, boolean> = crea
|
||||||
export default createStructuredSelector({
|
export default createStructuredSelector({
|
||||||
safe: safeSelector,
|
safe: safeSelector,
|
||||||
provider: providerNameSelector,
|
provider: providerNameSelector,
|
||||||
tokens: tokenListSelector,
|
tokens: orderedTokenListSelector,
|
||||||
activeTokens: activeTokensSelector,
|
activeTokens: activeTokensSelector,
|
||||||
granted: grantedSelector,
|
granted: grantedSelector,
|
||||||
userAddress: userAccountSelector,
|
userAddress: userAccountSelector,
|
||||||
|
|
|
@ -30,6 +30,11 @@ export const activeTokensSelector = createSelector(
|
||||||
(tokens: List<Token>) => tokens.filter((token: Token) => token.get('status')),
|
(tokens: List<Token>) => tokens.filter((token: Token) => token.get('status')),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
export const orderedTokenListSelector = createSelector(
|
||||||
|
tokenListSelector,
|
||||||
|
(tokens: List<Token>) => tokens.sortBy((token: Token) => token.get('symbol')),
|
||||||
|
)
|
||||||
|
|
||||||
export const tokenAddressesSelector = createSelector(
|
export const tokenAddressesSelector = createSelector(
|
||||||
tokenListSelector,
|
tokenListSelector,
|
||||||
(balances: List<Token>) => {
|
(balances: List<Token>) => {
|
||||||
|
|
Loading…
Reference in New Issue