Skip to content

fix flash of unlock screen - #710

Merged
bordalix merged 1 commit into
wt-wallet-redesign-followups-20260520from
fix_unlock_flash
Jul 2, 2026
Merged

bordalix merged 1 commit into
wt-wallet-redesign-followups-20260520from
fix_unlock_flash

Conversation

@bordalix

@bordalix bordalix commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Sometimes when reloading the app, we would see a flash of the unlock screen, even though the app was not locked.

The main cause was:

  • unlockWallet() does not only unlocks the wallet, it also initWallet()
  • to initWallet(), the app needs to know the server url or else will throw
  • in some rare occasions (mainly sw updates) the server url would only arrive AFTER the first try to unlock the wallet
  • this means the first try to unlock the wallet would throw and the app would think the default password didn't work, so the app should be locked => show unlock screen
  • the app would attempt to initWallet() again, and this time would work, removing the unlock UI from the screen

Fix:

  • wait for aspInfo.url to be defined before calling unlockWallet()

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • next-version

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8370c6ab-ee85-4242-958e-42f423cbe645

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix_unlock_flash

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bordalix
bordalix merged commit cacef80 into wt-wallet-redesign-followups-20260520 Jul 2, 2026
4 checks passed
bordalix added a commit that referenced this pull request Jul 7, 2026
* feat(wallet): redesign bitcoin home

Port the scoped home redesign foundation and bitcoin-only wallet home from the draft branch. Adds shared motion and haptics helpers, redesigned home header/hero/actions/assets/upsells/activity preview, hides bottom navigation for home-launched wallet flows, and wires scan/swap interactions without pulling in passkeys or prototype asset accounts.

* fix(wallet): use real assets on redesigned home

* fix(wallet): polish settings and activity follow-ups

Remove the bottom nav from the redesigned wallet flow and align the settings screens with the draft redesign, including the Arkade Mint entry under General.

Refresh the full Activity page before showing an empty state, keep the home activity preview hidden when empty, and use the shared secondary/drawer styling for the swap coming-soon sheet.

* chore(deps): update pnpm lockfile

* test(e2e): follow redesigned navigation

Update Playwright helpers and specs to navigate through the redesigned home header, settings entry points, and Boltz deep link instead of the removed bottom nav.

* test(e2e): align home and settings assertions

Use the settings header text rendered by the shared Header component and assert the redesigned zero-balance home through stable test ids.

* test(e2e): navigate app screens without reload

* tests fixes

* Guard BigInt coercion to prevent render-time crashes

* fix polling leak

* lint

* Add a fallback for --pill-navbar-footer-clearance in settings padding

* Remove overriding aria-label on settings rows.

* fix(settings): address Arkade Mint review feedback

* fix tests

* fix test

* feat(wallet): add bitcoin detail page (#630)

* feat(wallet): add bitcoin detail page

Add a bitcoin-only wallet detail screen opened from the home asset row, with the Liveline price chart, current price, percentage badge, holdings, wallet actions, and bitcoin-filtered recent activity.

Share the existing swap coming-soon drawer between home and the detail page, and cover the bitcoin row navigation with a wallet screen regression test.

* fix(wallet): harden bitcoin chart loading

Remove the invalid fiat conversion path from the bitcoin detail chart, use CoinGecko max data for non-USD all-time charts, cache chart responses per fiat/range, fetch Coinbase all-time chunks sequentially, and guard the holdings balance before BigInt conversion.

* fix(wallet): pause bitcoin chart while hovering

* fix tests

* fix test

* use graph worker

* default chart period one week

* remove console.log

* new marketData file

* fixes

---------

Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>
Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>

* feat(wallet): align recent activity with prototype (#628)

* chore(dev): support mnemonic wallet auto-init

Allow local dev auto-init to use VITE_DEV_MNEMONIC in addition to VITE_DEV_NSEC, so demo wallets can be restored from the current seed phrase without using the broken legacy default key.

* feat(wallet): align recent activity with prototype

Update the home recent activity list, full activity view, and transaction receipt details to match the prototype visuals while keeping the shared Activity header from PR 627. Add swap/account asset rendering, receipt-style detail rows, and measured virtual rows for taller activity entries.

* fix(wallet): address activity review feedback

Guard the round waiting screen when no info logs exist, cancel delayed polling on unmount, preserve the safer settlement status flow, remove incomplete BRL fiat support, and share token ticker mapping helpers across activity and asset views.

* fix send max with fiat ' + tests

---------

Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>
Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>

* feat(send): align send form with redesign prototype (#629)

Port the draft send-flow field shell, asset selector, amount max control, and button safety polish on top of PR 627.

Add dev mnemonic auto-init support so local wallets can boot from mnemonic-based seeds without falling back to stale nsec state.

Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>
Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>

* feat(wallet): align recent activity with prototype (#628)

* chore(dev): support mnemonic wallet auto-init

Allow local dev auto-init to use VITE_DEV_MNEMONIC in addition to VITE_DEV_NSEC, so demo wallets can be restored from the current seed phrase without using the broken legacy default key.

* feat(wallet): align recent activity with prototype

Update the home recent activity list, full activity view, and transaction receipt details to match the prototype visuals while keeping the shared Activity header from PR 627. Add swap/account asset rendering, receipt-style detail rows, and measured virtual rows for taller activity entries.

* fix(wallet): address activity review feedback

Guard the round waiting screen when no info logs exist, cancel delayed polling on unmount, preserve the safer settlement status flow, remove incomplete BRL fiat support, and share token ticker mapping helpers across activity and asset views.

* fix send max with fiat ' + tests

---------

Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>
Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>

* fix tests

* fix navigation

* remove border from video container in scan

* change toggle bg color when selected to purple

* fix(wallet): address home redesign review feedback

* fix flacky test

* fix flacky test

* contracts view: copy encoded params, empty state, active/inactive sections (#645)

* show encoded contract params and allow copying

* show encoded contract params and allow copying

* improve contracts view: empty state, active/inactive sections, label and createdAt

* address review: guard encodeArkContract, createdAt fallback, unique card key

Wrap encodeArkContract in try/catch via useMemo and render the parameters row only when encoding succeeds, so a contract with missing/malformed params can no longer white-screen the Contracts screen. Show 'Unknown' instead of an empty string when createdAt is absent. Use contract.address as the React key. Update tests with createdAt/params and add an empty-state case.

* fix buttons overflow in input

* fix other value when bip21 has amount

* remove excessive bottom padding on content-shell

* less sensible pull-to-refresh

* fix typescript build errors (tsc -b) (#646)

* fix typescript build errors (tsc -b)

* arkana fixes

* build fixes

* remove console.log

* validate asset mint amount is not too large

* validate asset mint amount

* validate mint values

* fixes

* refactor mint form

* remove console.log

* fix e2e tests

* feat(settings): move advanced tools into settings (#652)

* feat(settings): move advanced tools into settings

Remove the root Apps surface and keep developer-focused tools under Settings > Advanced. Add Boltz and Arkade Mint entries there, rename the main settings group to Display, and update navigation tab ownership so these flows return through settings instead of an apps tab.

Also refresh bun.lock to match the dependency versions declared on the PR 627 base and update affected settings/e2e tests.

* re-order menu options

* fix e2e tests

* fix test

---------

Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>
Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>

* feat(settings): support bitcoin currency units (#653)

* feat(settings): support bitcoin currency units

Add BTC as a selectable currency and replace display preferences with bitcoin unit options for BTC, sats, and BIP-177 notation.

Format wallet totals, transactions, send/receive flows, portfolio rows, and the Bitcoin detail view with the selected bitcoin unit while keeping the detail market price in fiat.

Convert fiat-like asset balances into selected-currency totals and add focused coverage for CHF asset conversion, settings options, formatting, and Bitcoin detail display.

* fix e2e test

* Several fixes

---------

Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>
Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>

* fallback to btc currency if price feed fails

* add useEffect missing dependencies to InputAmount

* fix e2e test

* arkana fixes

* Fix Settings / Display

* change Fiats type to Currencies
change Settings menu option names

* fix(wallet): address arkana wallet review

* fix other value when clicking send max

* update regtest link

* update price chart proxy url

* fix build errors

* style(settings): polish contracts screen (#664)

Redesign the dev-mode contracts screen with a full-width summary, clearer contract cards, copyable code fields, and subtle motion feedback.

Update the contracts screen tests to cover the new summary and metadata layout.

Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>

* feat(settings): add currency icons (#663)

Add reusable leading content support to the settings Select component and use it on the currency picker so each option shows a circular bitcoin or country currency mark.

Extend TokenLogo with the remaining fiat currency marks used by settings, add selector icon styling, and update the fiat settings tests to distinguish row icons from the selected-state checkmark.

Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>

* Fixes

* Remove onboarding button (#678)

* remove 'complete boarding' button

* Upgrade ts-sdk 0.4.36 - boltz-swap 0.3.41 (#676)

* prevent double keys in local storage (#677)

* prevent double keys in local storage

* fix circular dependency

* add tests

* fix SVGs

* remove "Complete boarding button"

---------

Co-authored-by: pietro909 <2094604+pietro909@users.noreply.github.com>

* Clean qrcode (#681)

* remove 'complete boarding' button

* fix SVGs

* remove "Complete boarding button"

* clean qr code ui

* remove console.log

* clean Reminder (#683)

* clean Reminder

* fix color

* fix duplicate init with devMnemonic

* fix test

* update regtest commit

* mini fixes

* fix test

* fix test

* persist value; fix toggle currency (#705)

* fix bitcoin balance in btc page

* fix server url input

* add error messages inline

* fix tests

* fix import

* fix secondary value when not useFiat

* fix flash of unlock screen (#710)

* bug fix in privacyAmount

* remove dead code

* click on asset card to view asset

* add test for clicking asset card in homepage

* fixes in input amount

* lnurl fix

* add unit tests

* bug fix

* fix test

* remove currencyDisplay from config (#713)

* remove currencyDisplay from config

* rabbit fixes

* fix test

* remove option from upsellsSection

* only show btc and registered assets on homepage

* fix import path

* rename config.fiat to config.currency

* fix test

---------

Co-authored-by: Sahil Chaturvedi <sahilc0@users.noreply.github.com>
Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>
Co-authored-by: pietro909 <2094604+pietro909@users.noreply.github.com>
@bordalix
bordalix deleted the fix_unlock_flash branch July 7, 2026 15:56
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