Skip to content

Conversation

thisconnect
Copy link
Collaborator

No description provided.

thisconnect and others added 30 commits September 3, 2025 23:39
…ling

Previously the dialog relied on `useRef` to directly manipulate DOM classes
(`classList.add/remove`). This made the component harder to reason about and
coupled logic tightly to the DOM.

Now the dialog uses React state (`isActive`, `isOpen`, `isClosing`) to
conditionally render CSS classes. This improves readability, keeps the
component declarative, and avoids unnecessary ref usage except where focus
management is required.
We have NDK 28 installed by docker_install.sh. Still, `make android` gave this output:

```
Checking the license for package NDK (Side by side) 27.0.12077973 in /opt/android-sdk/licenses
License for package NDK (Side by side) 27.0.12077973 accepted.
Preparing "Install NDK (Side by side) 27.0.12077973 v.27.0.12077973".
```

It is unclear `gradlew assemble` chose this version, it's not in any
cache/localprops.

Adding the version to build.gradle resolves this.
Fixing it by adding a check in WebView.swift for  a message
sent from the react app signaling react app is ready.

On ready, it reveals the webview smoothly with transition.
On some Android versions (e.g. Android 9) the authentication flow was
causing an endless loop of auth requests. This was fixed by moving the
setup of `BiometricAuthHelper` from `onStart` to `onCreate`.

In both Android and iOS the auth flow freezed if there was no
authentication method setup on the device. This was fixed by refactoring
the authentication flow code and adding a new possible authentication
response `authres-missing`, that allows to handle this case.
Was out of date, still mentioning Preact and jest.

We now use React and vitest with testing library.
Was used before the tests were migrated to use vitest and the mock
file rewritten to typescript, the new file is here:
- frontends/web/__mocks__/i18n.ts
```
go get github.com/BitBoxSwiss/bitbox02-api-go@cf47c3f4c5cfb0e891128baf323829069fd2669a && go mod tidy && go mod vendor
```
Account names don’t provide useful information and could reveal sensitive data.
Disabled coin selection option in BTC Direct sell widget, by setting
lockCryptocurrency instead of passing an address.

See:
- https://developer.btcdirect.eu/widget/sell-order-form#lock-cryptocurrency
Use hex encoding for rootFingerprint in the same way as in other
places in the codebase.
Add a new expert setting in BitBoxApp that allows changing the gap
limit used for transaction discovery on bitcoin receive and change
addresses. Until now, this was only possible via command-line.
`GetUnusedReceiveAddresses()` returned `nil` on an unsynced account
now. Before, it used to block until it was synced. This change lead to
a regression in AOPP, where accessing `GetUnusedReceiveAddresses()[0]`
panicked. This would happen when one would enter the AOPP workflow and
unlocked the BitBox (which makes the account available) during the
AOPP workflow.

This commit adds an error return type to `GetUnusedReceiveAddresses()`
to make it clear this case should be handled. For AOPP, the quick fix
here is to wait while its synced like before.
columnsContainer, columns and column CSS classes have been mostly
replaced by newer Grid and Column component and shouldn't be needed
anymore.

The set-device-name popup has no grid / column anyway and can be
savely removed.

Also changed the first text 'current device name' and moved into
the paragraph. This is a small layout change.
columnsContainer, columns and column CSS classes have been mostly
replaced by newer Grid and Column component and shouldn't be needed
anymore.

The set-device-name popup has no grid / column anyway and can be
savely removed.
The native select dropdown sometimes renders with buggy visual
effect on windows.

Fixed by changing to dropdown component which is a wrapper around
react-select lib and doesn't ues native select element.
Added a new message that sends the transaction id to the widget
after the user signed. And a new message that sends info about
canceled payment.

With this Pocket can give immediate feedback in the widget.

Adding a new field correlationId to every message that allows to
correlate request and response messages.

Updated [email protected] npm module.

Co-authored-by: TKone7 <[email protected]>
@thisconnect thisconnect marked this pull request as draft September 17, 2025 09:55
@thisconnect thisconnect reopened this Sep 17, 2025
benma and others added 24 commits September 17, 2025 16:10
Simplifies the internal state and prepares to move the focus handling
into a hook, which can be done in the next commit.
Moving to a hook allows to re-use this logic in other components
in the future.

Additionally added logic to focus previously focused element after
component is unmounted.

Added focous to the input field in change device name component.
Clicking inside → dragging out → releasing won’t trigger close anymore
This allows devs to use the app without a real device and without
relying on the software keystore.
The same issue we fixed on Android also exists on iOS. See comments in
code for details.
PSBT BIP: https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki

bitbox02-api-go now has a `BTCSignPSBT()` function, which simplifies
the signing code in the app significantly.

Benefits include:
- Standardized, so easier for devs to understand and maintain
- Future-proofing (interopable, extensible)
- Clear lifecycle:
  - Create (unsigned)
  - Update (add metadata)
  - Sign (BitBox)
  - Extract (create sigscripts and witnesses, create final signed tx)

The btcd/psbt lib is used and contains a function to extract the tx,
which makes our own functions to create sigscripts/witnesses
redundant.

godot is removed as a linter b/c of false positives and it not being
worth wasting time over not finishing a docstring with a dot.
bitbox02-api-go now automagically determines if the output belongs to
the same account as the inputs or not, so we don't need this flag anymore.
No need anymore that we don't need to track if an address belongs to
the same account or not.
Since we use PSBT's and btcd/psbt's extract function, our own function
to create witnesses is redundant. We still need it in the test, so we
just move it there for now.
Only apply focus to first element with autoFocus, if no other
element already has focus.

This fixed a bug where typing into the input element looses focus
due to re-rendering and re-focusing the same element.
To avoid spurious failures when the servewallet takes more times to be
ready, we increase the timeout but also we log how long a successful
connection took, in order to help keep track of it.
Use BTC Direct walletAddress from btcdirect-embeddable-coin-to-
fiat-order-requested event.

With this the hardcoded addresses can be removed in the backend.
BTC Direct sell addresses were hardcoded in the backend, but they are
not needed anymore, since the address is received by the widget. This is
more flexible and allows BTC Direct to update their addresses without
need for any update on our side.
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.

6 participants