trezor / trezor-suite

Trezor Suite Monorepo
https://trezor.io/trezor-suite
Other
697 stars 246 forks source link

Unify invalid passphrase errors to passphrase mismatch #7557

Open sime opened 1 year ago

sime commented 1 year ago

Passphrase mismatch language is misleading.

Screenshot 2023-02-06 at 16 57 07 Screenshot 2023-02-06 at 16 55 37

sime commented 1 year ago

Discovered strings

AdamSchinzel commented 1 year ago

Discovered strings

  • TR_AUTH_CONFIRM_FAILED_DESC: Invalid passphrase confirmation.
  • TOAST_AUTH_CONFIRM_ERROR_DEFAULT: Invalid passphrase
  • Device_InvalidState: 'Passphrase is incorrect'
Hannsek commented 1 year ago

👀 https://www.notion.so/satoshilabs/6b5ba89df787440c8b881140f1462256?v=f7ec7c38ff7947b6b1b6e02f452f2fea

AdamSchinzel commented 1 year ago

The added string by me is there or what do you mean by the link?

AdamSchinzel commented 1 year ago

Also think that TOAST_AUTH_CONFIRM_ERROR: 'Passphrase confirmation error: {error}' could be just 'Invalid passphrase: {error}' what you think guys @sime @Hannsek ?

Hannsek commented 1 year ago

It does mean something different to me. Passphrase confirmation error is that the user didn't input the same passphrase twice. The invalid passphrase is that you have used some weird symbols. No?

sime commented 1 year ago

The original concept for this issue is to unify the language when passphrase combinations do not match (aka mismatch). As there is no such thing as invalid and incorrect passphrases.

@AdamSchinzel Can you identify all the flows that triggered these previous errors? My concern is the nuances.

If they are serving the same error, then lets summon a word smith.

sime commented 1 year ago

@AdamSchinzel I found these examples of reproduction. Though I am missing the source string of the last screen 'address verification'

image image image

AdamSchinzel commented 1 year ago

Should be TOAST_VERIFY_ADDRESS_ERROR

sime commented 1 year ago

@cavigneron

Could you help in cases a passphrase has been incorrectly entered. Occurs in two situations:

  1. New passphrase wallet is open (no previous TXs), and Suite wants to double-check that this is the real one, so user must re-enter the passphrase. If they do not match, user is prompted. image image

3.1. Passphrase wallet is remembered, user attempts to retrieve a new address, and passphrase does not match.

image 2.2 Passphrase wallet is remembered, user attempts to send TX, and passphrase does not match (pictured below).

Screenshot 2023-08-15 at 13 43 42

sime commented 1 year ago

@AdamSchinzel Tackling some of these strings in Crowdin with @cavigneron

Tempted to blank TR_AUTH_CONFIRM_FAILED_DESC. Is it plausible to remove this key completely?

TOAST_AUTH_CONFIRM_ERROR_DEFAULT often has a prefix like address verification and transaction signing failed. Can these prefix be dropped easily?

AdamSchinzel commented 1 year ago

@trezor/qa for now we will just drop TR_AUTH_CONFIRM_FAILED_DESC (so description in container when you e.g. failed to confirm passphrase).