terra-money / station-mobile

🛰️ Station wallet mobile
https://apps.apple.com/it/app/terra-station/id1548434735
34 stars 61 forks source link

Ledger authorization confused by fingerprint auth & temp workaround #30

Closed d13co closed 2 years ago

d13co commented 2 years ago

Hi,

First of all, great job supporting Ledger on mobile!

I hit upon an issue that you may want to fix (workaround at bottom):

Environment

Station Mobile v1.5.4-136 on Android 11

I have a normal (non-ledger) account and a ledger account. I have bio (fingerprint) authentication enabled for the non-ledger account and this setting seems to apply app-wide when I switch wallets to the ledger one.

A prerequisite for this bug seems to be a bio-auth enabled account existing on the app, as there is no "bio-auth" setting offered in the ledger account options, but the setting seems to persist in the app settings from the other account.

Problem

When authorizing third-party ledger transactions (e.g. Anchor) with biometric auth enabled on the app, it chooses the fingerprint method to authenticate. Authorizing that way obviously doesn't work and it fails silently.

Proposed solution

It would help the UX if you detect that a currently-logged in account is hardware-wallet authed and skip biometric authentication in these cases.

Temporary workaround

To make this work on the current version you can:

0) Tap "Sign" when your transaction opens on station mobile. You get the fingerprint auth modal instead of ledger selection screen.

1) Tap "cancel" on the fingerprint auth screen (or hit the back button, if you have one)

2) Tap "OK" when asked "Would you like to confirm with your password"?

3) The Ledger selection screen appears and you can authorize properly

Alternatively, disabling bio auth on the other account(s) should also work.

hanwong commented 2 years ago

Hi! Thanks for a specific report. I fixed this issue on v139, please check.