Skip to content

Fix keystone flow#554

Open
dewabisma wants to merge 3 commits into
mainfrom
beast/fix-keystone
Open

Fix keystone flow#554
dewabisma wants to merge 3 commits into
mainfrom
beast/fix-keystone

Conversation

@dewabisma

@dewabisma dewabisma commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Now display details for tx in sign screen
  • Now cache keystone session, to avoid bad flow when user just want to reconfirm by pressing back button.

Intentionally didn't disable back button, because don't want to block the flow. User might be stuck if we disable back button.

Screenshots

  • Sign screen
image

Note

Medium Risk
Changes hardware-wallet signing payload reuse and navigation; incorrect session clearing could show a stale QR, though new sends explicitly reset the cache.

Overview
Improves the Keystone hardware send flow by caching the unsigned payload and UR QR parts for the current send, and by showing amount, recipient, and checkphrase on the sign screen.

A new Riverpod keystoneSignCacheProvider holds a single entry keyed by account, recipient, and amount (block height and nonce are excluded so minor chain drift does not force a new QR while the user navigates back within the same send). KeystoneSignScreen reuses the cache on _prepare when the key matches; otherwise it builds, stores, and displays as before. startNewSendSession() clears the cache when the user starts a fresh send from home (Send, multisig propose, pay intent) or from the shared-address “Send to this account” action so a new flow does not reuse an old QR.

When continuing to signature scan, block height is taken from the cached unsigned payload’s blockNumber instead of the value passed into the sign screen. Unit tests cover cache keys (address trimming) and notifier store/lookup/session invalidation.

Reviewed by Cursor Bugbot for commit b5960c8. Configure here.

@dewabisma dewabisma requested a review from n13 July 2, 2026 10:13

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit b5960c8. Configure here.

Comment thread mobile-app/lib/v2/screens/send/keystone_sign_cache.dart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant