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

✨ (app-updates): add settings to mock app update #7525

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

valpinkman
Copy link
Member

@valpinkman valpinkman commented Aug 6, 2024

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • live-env: new MOCK_APP_UPDATE env
    • live-common: apps/logic modified to take into account MOCK_APP_UPDATE
    • lld / llm: use common + env to fake app updates in the manager

📝 Description

Add a new developer setting in both LLD and LLM to fake app upate in MyLedger / Manager.
It will reinstall the current installed app
Will be useful for testing (in anticipation of the app data backup / restore integration)

To test it:

  • on lld or llm enable developer mode
  • toggle Mock App Update
  • go back to My Ledger
    • all the apps installed on your device should have an update

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

@valpinkman valpinkman requested review from a team as code owners August 6, 2024 13:46
Copy link

vercel bot commented Aug 6, 2024

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

Name Status Preview Comments Updated (UTC)
web-tools ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 6, 2024 3:35pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Aug 6, 2024 3:35pm
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Aug 6, 2024 3:35pm
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Aug 6, 2024 3:35pm
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Aug 6, 2024 3:35pm

@live-github-bot live-github-bot bot added desktop Has changes in LLD mobile Has changes in LLM common Has changes in live-common translations Translation files have been touched labels Aug 6, 2024
import Switch from "~/renderer/components/Switch";

const MockAppUpdate = () => {
const [enabled, setEnabled] = useState(getEnv("MOCK_APP_UPDATE"));
Copy link
Contributor

@gre gre Aug 6, 2024

Choose a reason for hiding this comment

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

you can use useEnv and then any setEnv will automatically will have the state reflecting this for you. which can simplify the need to have to manage a setEnabled at all

https://github.com/LedgerHQ/ledger-live/blob/develop/libs/ledger-live-common/src/hooks/useEnv.ts

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks will change

mbertin-ledger
mbertin-ledger previously approved these changes Aug 6, 2024
gre
gre previously approved these changes Aug 6, 2024
@live-github-bot live-github-bot bot added the tools Has changes in tools label Aug 6, 2024
@valpinkman valpinkman force-pushed the feat/live-13573-mock-app-update branch from cbbc9be to 65fd2f0 Compare August 6, 2024 15:23
@live-github-bot live-github-bot bot added the automation CI/CD stuff label Aug 6, 2024
@valpinkman valpinkman merged commit f0d959c into develop Aug 7, 2024
51 of 56 checks passed
@valpinkman valpinkman deleted the feat/live-13573-mock-app-update branch August 7, 2024 14:33
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 translations Translation files have been touched
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants