Replace dummy-message biometric pre-auth with explicit ensureUnlocked()#40
Draft
Copilot wants to merge 2 commits intochen/fix-errorhandlingfrom
Draft
Replace dummy-message biometric pre-auth with explicit ensureUnlocked()#40Copilot wants to merge 2 commits intochen/fix-errorhandlingfrom
Copilot wants to merge 2 commits intochen/fix-errorhandlingfrom
Conversation
…mmy signMessage Co-authored-by: mocolicious <6373607+mocolicious@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [WIP] Address feedback on error handling improvements
Replace dummy-message biometric pre-auth with explicit ensureUnlocked()
Mar 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GaslessManager.ensureBiometricAuth()was callingsignMessage("auth:purpose")to unlock the vault and cache the public key before transaction building. ForVaultSignerin PerOperation mode this caused two biometric prompts per operation; for custom signers it produced an unnecessary signature.Changes
TransactionSignerinterface — Addedsuspend fun ensureUnlocked()with a default no-op. Vault-backed signers override it for explicit pre-authentication without producing a signature.VaultSigner— ImplementsensureUnlocked(): performs one biometric prompt, caches the public key, and (PerOperation mode) stores the keypair as a single-usependingKeypair.signMessage()consumespendingKeypairwhen present, skipping the second unlock:SessionBased mode continues to rely on VaultManager's TTL session cache.
GaslessManager—ensureBiometricAuth()now delegates tosigner.ensureUnlocked(). Removed the now-meaninglesspurpose: Stringparameter from the helper and all six call sites.📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.