Skip to content

Conversation

Lemonexe
Copy link
Contributor

@Lemonexe Lemonexe commented Oct 10, 2025

Description

  • refactor mobile createAndBackupWalletThunk
    • fullfill/reject with value instead of return/throw
    • move navigation side-effect to React
  • unify a key part of entropy check result handling to suite-common

QA instructions

Test the happy path:

  • mobile device onboarding
  • mobile device onboarding after partial onboarding in web (wallet created but backup not done)
  • web device onboarding

If possible, test both with a device that does not pass entropy check.

Screenshots:

ℹ️ entropy check failure tested with the testing branch

mobile entropy success.webm
mobile entropy fail.webm
mobile entropy check disabled.webm (via local message system)
mobile initiating backup.webm (device needs backup after partial onboarding in suite)
desktop entropy success.webm
desktop entropy fail.webm
desktop entropy disabled.webm

🔍🖥️ Suite web test results: View in Currents

🔍🖥️ Suite desktop test results: View in Currents

🔍🖥️ Suite native android test results: View in Currents

@Lemonexe Lemonexe added the mobile Suite Lite issues and PRs label Oct 10, 2025
@github-project-automation github-project-automation bot moved this to 🎯 To do in Suite Mobile Oct 10, 2025

const isEntropyCheckEnabled = useSelector((state: MessageSystemRootState) =>
selectIsFeatureEnabled(state, Feature.entropyCheckMobile, true),
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

extracting .navigate side-effect from the thunk to React means that I have to duplicate the condition for isEntropyCheckEnabled but that's acceptable I guess.

@Lemonexe Lemonexe force-pushed the chore/entropy-thunks-cleanup branch from 0350a85 to d38b037 Compare October 10, 2025 09:48
@trezor-bot
Copy link
Contributor

trezor-bot bot commented Oct 10, 2025

✅ Previously successful run of [Test] PR Suite Desktop e2e tests workflow has been found.
⏭️ Skipping tests for this run.
💡 If you are unsure about your latest changes, please rerun the workflow manually. (Use the Re-run all jobs option)

@trezor-bot
Copy link
Contributor

trezor-bot bot commented Oct 10, 2025

✅ Previously successful run of [Test] PR Suite Web e2e tests workflow has been found.
⏭️ Skipping tests for this run.
💡 If you are unsure about your latest changes, please rerun the workflow manually. (Use the Re-run all jobs option)

@Lemonexe Lemonexe marked this pull request as ready for review October 10, 2025 09:52
@Lemonexe Lemonexe requested a review from a team as a code owner October 10, 2025 09:52
dispatch(failEntropyCheckThunk({ device, error: result.payload }));
}
},
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

⚠️ pls careful CR, this is a really key part where a lot can go wrong.
I copied the implementation from suite.
Unifying it will lower the surface for future human mistakes 🙂

@Lemonexe Lemonexe force-pushed the chore/entropy-thunks-cleanup branch from d38b037 to 40dbbc0 Compare October 10, 2025 09:57
@Lemonexe Lemonexe requested review from juriczech and komret October 10, 2025 10:02
@Lemonexe Lemonexe moved this to 🏃‍♀️ In progress in Suite Desktop Oct 10, 2025
@Lemonexe Lemonexe moved this from 🎯 To do to 🏃‍♀️ In progress in Suite Mobile Oct 10, 2025
@Lemonexe Lemonexe moved this from 🏃‍♀️ In progress to 🔎 Needs review in Suite Desktop Oct 10, 2025
@Lemonexe Lemonexe force-pushed the chore/entropy-thunks-cleanup branch from 73feaa6 to c0c5f83 Compare October 14, 2025 06:24
) {
const { code } = responsePayload.payload;
if (code && DEFINITIVE_ERRORS.includes(code)) {
if (isEntropyCheckEnabled && code === 'Failure_EntropyCheck') {
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: I think what's not ideal is that we could simply return the value of failEntropyCheckThunk all the way to the result of createAndBackupWalletThunk and by doing that, we wouldn't have to store it in the state and select it here and just look at the type of return value to see whether it's the "correct" error. Again, out of scope for this PR for sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Together with your comment above it's a good followup for a next PR in future.

Copy link
Contributor

@juriczech juriczech left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just some nitpick comments for discussion that shouldn't be blockers.

Mobile success works as expected. Tested error on branch FW-check-UI-testing-branch where I "succesfully" get redirected to DeviceCompromisedModal screen 💪

@Lemonexe Lemonexe force-pushed the chore/entropy-thunks-cleanup branch from c0c5f83 to f4eaba4 Compare October 16, 2025 14:13
@Lemonexe Lemonexe merged commit d0742f1 into develop Oct 16, 2025
44 of 46 checks passed
@Lemonexe Lemonexe deleted the chore/entropy-thunks-cleanup branch October 16, 2025 15:29
@github-project-automation github-project-automation bot moved this from 🏃‍♀️ In progress to 🤝 Needs QA in Suite Mobile Oct 16, 2025
@github-project-automation github-project-automation bot moved this from 🔎 Needs review to 🤝 Needs QA in Suite Desktop Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mobile Suite Lite issues and PRs

Projects

Status: 🤝 Needs QA
Status: 🤝 Needs QA

Development

Successfully merging this pull request may close these issues.

2 participants