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

FAT-569 - Fix infinite loop in ChangeDeviceLanguagePromptDrawer #1654

Merged
merged 3 commits into from
Oct 25, 2022

Conversation

ofreyssinet-ledger
Copy link
Contributor

@ofreyssinet-ledger ofreyssinet-ledger commented Oct 24, 2022

📝 Description

Steps to Reproduce:

  1. Enable the device localization FF

  2. connect a device that supports localization so its registered in LLD as the “last seen” device. (Go to the manager for instance)

  3. Go to settings, change the language to a one supported for device localization

  4. When prompted, choose to install the language on the device.

  5. Deny on the device or do any action that would trigger an error in the device action

Expected behavior:

LLD doesn’t go into an infinite loop, sending thousands of error events until the drawer is closed.

Actual behavior:

LLD goes in into an infinite loop, sending thousands of error events until the drawer is closed

❓ Context

  • Impacted projects: ledger-live-desktop
  • Linked resource(s): FAT-569

✅ 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.

@vercel
Copy link

vercel bot commented Oct 24, 2022

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

Name Status Preview Updated
live-common-tools ✅ Ready (Inspect) Visit Preview Oct 24, 2022 at 4:40PM (UTC)
3 Ignored Deployments
Name Status Preview Updated
ledger-live-github-bot ⬜️ Ignored (Inspect) Oct 24, 2022 at 4:40PM (UTC)
native-ui-storybook ⬜️ Ignored (Inspect) Oct 24, 2022 at 4:40PM (UTC)
react-ui-storybook ⬜️ Ignored (Inspect) Oct 24, 2022 at 4:40PM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Oct 24, 2022

🦋 Changeset detected

Latest commit: 2fd8332

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
ledger-live-desktop Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions bot added the desktop Has changes in LLD label Oct 24, 2022
@ofreyssinet-ledger ofreyssinet-ledger marked this pull request as ready for review October 24, 2022 10:48
@codecov
Copy link

codecov bot commented Oct 24, 2022

Codecov Report

Base: 0.00% // Head: 43.23% // Increases project coverage by +43.23% 🎉

Coverage data is based on head (a468d51) compared to base (c4b16f3).
Patch has no changes to coverable lines.

❗ Current head a468d51 differs from pull request most recent head 2fd8332. Consider uploading reports for the commit 2fd8332 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #1654       +/-   ##
============================================
+ Coverage         0   43.23%   +43.23%     
============================================
  Files            0      611      +611     
  Lines            0    25539    +25539     
  Branches         0     7015     +7015     
============================================
+ Hits             0    11041    +11041     
- Misses           0    13370    +13370     
- Partials         0     1128     +1128     
Flag Coverage Δ
test 43.23% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ger-live-common/src/families/polkadot/bridge/js.ts 80.95% <0.00%> (ø)
...ve-common/src/families/bitcoin/wallet-btc/index.ts 89.18% <0.00%> (ø)
libs/ledger-live-common/src/account/helpers.ts 74.86% <0.00%> (ø)
...ledger-live-common/src/consoleWarnExpectToEqual.ts 40.00% <0.00%> (ø)
.../ledger-live-common/src/families/tron/bridge/js.ts 10.55% <0.00%> (ø)
...dger-live-common/src/exchange/swap/getKYCStatus.ts 46.66% <0.00%> (ø)
libs/ledger-live-common/src/promise.ts 57.44% <0.00%> (ø)
...mon/src/families/solana/js-estimateMaxSpendable.ts 28.57% <0.00%> (ø)
...live-common/src/families/ethereum/modules/index.ts 54.76% <0.00%> (ø)
.../ledger-live-common/src/families/tron/constants.ts 100.00% <0.00%> (ø)
... and 601 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

github-actions bot commented Oct 24, 2022

@ofreyssinet-ledger

Screenshots: ❌

It seems this PR contains screenshots that are different from the base branch.
If you are sure all those changes are correct, you can comment on this PR with /generate-screenshots to update those screenshots.

Make sure all the changes are correct before running the command, as it will commit and push the new result to the PR.

linux

Actual Diff Expected
v3-onboarding-complete-actual v3-onboarding-complete-diff v3-onboarding-complete-expected
v3-onboarding-complete-actual v3-onboarding-complete-diff v3-onboarding-complete-expected

@ofreyssinet-ledger ofreyssinet-ledger merged commit 086ab8d into develop Oct 25, 2022
@ofreyssinet-ledger ofreyssinet-ledger deleted the bugfix/install-lang-infinite-loop branch October 25, 2022 09:51
adrienlacombe pushed a commit that referenced this pull request Oct 26, 2022
* Fix infinite loop in ChangeDeviceLanguagePromptDrawer

* changeset

* Memoize ChangeDeviceLanguageAction & ChangeDeviceLanguagePromptDrawer
adrienlacombe pushed a commit that referenced this pull request Oct 26, 2022
* Fix infinite loop in ChangeDeviceLanguagePromptDrawer

* changeset

* Memoize ChangeDeviceLanguageAction & ChangeDeviceLanguagePromptDrawer
cgrellard-ledger pushed a commit that referenced this pull request Oct 27, 2022
* Fix infinite loop in ChangeDeviceLanguagePromptDrawer

* changeset

* Memoize ChangeDeviceLanguageAction & ChangeDeviceLanguagePromptDrawer
cgrellard-ledger pushed a commit that referenced this pull request Oct 27, 2022
* Fix infinite loop in ChangeDeviceLanguagePromptDrawer

* changeset

* Memoize ChangeDeviceLanguageAction & ChangeDeviceLanguagePromptDrawer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop Has changes in LLD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants