Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cardano + tokens issues #16459

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

vytick
Copy link
Contributor

@vytick vytick commented Jan 17, 2025

a6eedc8 count fiat balance for cardano tokens after decimals are applied
3aa329a dont fetch token definitions for not enabled networks and dont show them in this case

Related Issue

Resolve #16423
Resolve #16410

Screenshots:

BEFORE:

AFTER:

@vytick vytick added the mobile Suite Lite issues and PRs label Jan 17, 2025
@vytick vytick requested review from Nodonisko and a team as code owners January 17, 2025 22:17
@vytick vytick changed the title fix(graph): use decimals with cardano tokens in graph data Cardano + tokens issues Jan 17, 2025
@vytick vytick added the cardano Related to Cardano (ADA) blockchain platform label Jan 17, 2025
@@ -185,7 +186,11 @@ export const selectTokenDefinitionsEnabledNetworks = createMemoizedSelector(
[selectEnabledDiscoveryNetworkSymbols, selectNetworkSymbolsOfAccountsWithTokensAllowed],
(enabledNetworkSymbols, accountNetworkSymbols) =>
returnStableArrayIfEmpty(
F.toMutable(A.uniq([...enabledNetworkSymbols, ...accountNetworkSymbols])),
F.toMutable(
A.uniq([...enabledNetworkSymbols, ...accountNetworkSymbols]).filter(s =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use pipe and ideally move filter before uniq

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


const knownTokens = useSelector((state: TokenDefinitionsRootState) =>
selectFilterKnownTokens(state, symbol, accountInfo.tokens ?? []),
canHaveTokens ? selectFilterKnownTokens(state, symbol, accountInfo.tokens ?? []) : [],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this just return empty array even without condition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 22
  • More info

Learn more about 𝝠 Expo Github Action

@vytick vytick requested a review from Nodonisko January 19, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cardano Related to Cardano (ADA) blockchain platform mobile Suite Lite issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cardano tokens showing when adding account to portfolio Cardano fiat rate on dashboard is wrong
2 participants