Skip to content

backend: eliminate banner reminder false positives#3747

Merged
bznein merged 2 commits intoBitBoxSwiss:masterfrom
bznein:banner-codex
Feb 12, 2026
Merged

backend: eliminate banner reminder false positives#3747
bznein merged 2 commits intoBitBoxSwiss:masterfrom
bznein:banner-codex

Conversation

@bznein
Copy link
Copy Markdown
Collaborator

@bznein bznein commented Jan 7, 2026

Instead of always showing the banner if the balance is above the threshold, we do not show it for accounts that were already over it the first time we check.

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

@bznein bznein force-pushed the banner-codex branch 7 times, most recently from 4b1588a to 9b75618 Compare January 8, 2026 10:45
@bznein
Copy link
Copy Markdown
Collaborator Author

bznein commented Jan 8, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

ℹ️ 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".

@bznein bznein requested a review from Beerosagos January 8, 2026 11:06
@bznein bznein marked this pull request as ready for review January 8, 2026 11:06
Copy link
Copy Markdown
Collaborator

@Beerosagos Beerosagos left a comment

Choose a reason for hiding this comment

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

tACK with a few nits! 🙏

I left a few suggestions to improve readability and I think adding 1-2 comments in the right places could help too. Feel free to ignore the suggestions tho

Comment thread backend/handlers/handlers.go Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not related to this PR, but while you're here: can you change to smth like: "Could not retrieve fiat balance for keystore"? 🙏

Comment thread backend/handlers/handlers.go Outdated
}
}
if keystoreConfig, err := handlers.backend.Config().AccountsConfig().LookupKeystore(rootFingerprint); err == nil {
existingAllowed = keystoreConfig.BackupReminderAllowed
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

existingAllowed -> reminderConfig

Comment thread backend/handlers/handlers.go Outdated
}

show := overThreshold
desiredAllowed := existingAllowed
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

desiredAllowed -> reminderAllowed

Comment thread backend/handlers/handlers.go Outdated

show := overThreshold
desiredAllowed := existingAllowed
shouldUpdateAllowed := false
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

shouldUpdateAllowed -> shouldUpdateConfig

Comment thread backend/handlers/handlers.go Outdated
show = false
}

if shouldUpdateAllowed && desiredAllowed != nil {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: you could move this section inside the existingAllowed == nil block and avoid shouldUpdateAllowed logic at all.

Instead of always showing the banner if the balance is above the
threshold, we do not show it for accounts that were already over it
the first time we check.
Remove the old banner test and replace with a more comprehensive
approach that covers more cases.
@bznein bznein merged commit 8aa73b2 into BitBoxSwiss:master Feb 12, 2026
15 of 16 checks passed
@bznein bznein deleted the banner-codex branch February 12, 2026 14:44
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.

2 participants