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

[SUPPORT] remove unnecessary check on tx networkInfo to render SendRowsFee #4010

Conversation

chabroA
Copy link
Contributor

@chabroA chabroA commented Jul 12, 2023

📝 Description

Following this comment #3945 (comment) and the related discussion, proposal to remove what seem to be an unnecessary condition on the existence of a networkInfo property on the transaction object to render (or not) a family custom SendRowsFee component.

Not all crypto transaction types have a networkInfo property and some of them have some custom SendRowsFee component.
If a family SendRowsFee component display is dependent on the presence of a networkInfo property in the transaction object, these families own SendRowsFee component will never be displayed.

This condition seems odd because not all families have a networkInfo property in their transaction. For example algorand, but also the new evm. But these families have their own SendRowsFee component defined in their family folder. Same thing for celo, polkadot, solana (here we even have some hardcoded patch, cf. this).
So, based on this logic, as of today the SendRowsFee for algorand, celo and polkadot would not be displayed.

Furthermore, we don't seem to have similar logic on LLD (cf. here and here) where we don't have an condition on networkInfo.

The only place where I found such condition on LLD are these 2 files (here and here) related to swap, which might probably be some legacy logic from original swap implementation since these 2 conditions control the display of the SendAmountFields file listed just above, and it would not make sense to always display this component on a normal send flow but not on a swap flow (if I can edit fees on a normal send, why could I not do it in a Swap flow?)

❓ Context

✅ Checklist

  • Test coverage
  • Atomic delivery
  • No breaking changes

📸 Demo

🚀 Expectations to reach

Please make sure you follow these Important Steps.

Pull Requests must pass the CI and be internally validated in order to be merged.

@changeset-bot
Copy link

changeset-bot bot commented Jul 12, 2023

⚠️ No Changeset found

Latest commit: a6edf06

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jul 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
live-common-tools ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 13, 2023 9:50am
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-github-bot ⬜️ Ignored (Inspect) Jul 13, 2023 9:50am
native-ui-storybook ⬜️ Ignored (Inspect) Jul 13, 2023 9:50am
react-ui-storybook ⬜️ Ignored (Inspect) Jul 13, 2023 9:50am

@github-actions github-actions bot added the mobile Has changes in LLM label Jul 12, 2023
@chabroA chabroA marked this pull request as draft July 12, 2023 14:07
@chabroA chabroA force-pushed the support/refacto-LLM-SendRowsFee branch from 3280bb2 to ef15d4a Compare July 13, 2023 08:25
@github-actions github-actions bot added the desktop Has changes in LLD label Jul 13, 2023
@chabroA chabroA marked this pull request as ready for review July 13, 2023 08:27
not all crypto transaction types have a networkInfo property and some
of them have some custom SendRowsFee component
If a family SendRowsFee component display is dependent on the
presence of a networkInfo property in the transaction object, these
families own SendRowsFee component will never be displayed
@chabroA
Copy link
Contributor Author

chabroA commented Jul 13, 2023

cherry-picked on develop and moved in this PR #4020 to make it independent from gas tracker work

@chabroA chabroA closed this Jul 13, 2023
@chabroA chabroA deleted the support/refacto-LLM-SendRowsFee branch July 13, 2023 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Has changes in live-common desktop Has changes in LLD mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants