Skip to content

backend: handle AOPP Signing abort by user for BTC.#3848

Merged
bznein merged 1 commit intoBitBoxSwiss:masterfrom
bznein:aoppCancelBug
Feb 9, 2026
Merged

backend: handle AOPP Signing abort by user for BTC.#3848
bznein merged 1 commit intoBitBoxSwiss:masterfrom
bznein:aoppCancelBug

Conversation

@bznein
Copy link
Copy Markdown
Collaborator

@bznein bznein commented Feb 5, 2026

We need to check for error before returning, otherwise signResult will be nil and we can't dereference it. Furthermore, we return a specific ErrSigningAborted in case the user aborted the signing.

In the aopp code, we change the condition to check for ErrSigningAborted rather than ErrorAbort from the firmware package. This also aligns with how we handle aborting an ETH Sign Message.

We extract common code shared between ETH and BTC to make it less likely to have the same error/discrepancy in the future.

Before asking for reviews, here is a check list of the most common things you might need to consider:

  • updating the Changelog
  • writing unit tests
  • checking if your changes affect other coins or tokens in unintended ways
  • testing on multiple environments (Qt, Android, ...)
  • having an AI review your changes

We need to check for error before returning, otherwise signResult will
be nil and we can't dereference it. Furthermore, we return a specific
ErrSigningAborted in case the user aborted the signing.

In the aopp code, we change the condition to check for ErrSigningAborted
rather than ErrorAbort from the firmware package. This also aligns with
how we handle aborting an ETH Sign Message.

We extract common code shared between ETH and BTC to make it less likely
to have the same error/discrepancy in the future.
@bznein bznein requested review from benma and thisconnect February 5, 2026 12:05
@bznein
Copy link
Copy Markdown
Collaborator Author

bznein commented Feb 5, 2026

@codex review

@bznein
Copy link
Copy Markdown
Collaborator Author

bznein commented Feb 5, 2026

Added @thisconnect as reviewer to test it (since he reported the issue originally) and @benma since it changes backend logic.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

@benma benma left a comment

Choose a reason for hiding this comment

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

utACK, very nice!

Copy link
Copy Markdown
Collaborator

@thisconnect thisconnect left a comment

Choose a reason for hiding this comment

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

tested Qt / macOS LGTM

@bznein bznein merged commit 359e00f into BitBoxSwiss:master Feb 9, 2026
16 checks passed
@bznein bznein deleted the aoppCancelBug branch February 9, 2026 15:05
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.

3 participants