Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master into staging ln #3102

Merged
merged 27 commits into from
Dec 10, 2024

Conversation

Beerosagos
Copy link
Collaborator

Conflicts:

  • frontends/web/src/components/transactions/transaction.tsx

Also had to update:

  • frontends/web/src/routes/lightning/send/send.tsx

To fix an error caused by the recent update in eslint rules.

thisconnect and others added 27 commits November 28, 2024 16:46
So that we do not accidentally pass undefined, null, booleans or
just any type in tempalte literals, see:

    `all these should error ${false} ${undefined} ${[]} ${null}`

This is a eslint rule, so only make weblint will check.
Last commit introduced restrict-template-expressions, with this all
reported problems should be fixed.
There seem to be no major edge cases using numbers in template
literals and allowing them seems reasonable.
In c6ee6e0 the large prop on the SwissMadeOpenSource component
was removed as it did not work since a long time and was for
BitBox01 only, this commit removes the unused CSS.
Pocket and Bitsurance integrations both feature an address signing
request in their widgets. With the previous implementation any
re-rendering of the component (e.g. because of screen rotation on phone)
caused the loss of the widget reference and the fail of the request.
This commit fixes the bug.
* Fixes missing artifact URL in Mattermost artifact reports
* Upload action will fail now if no files are found
and add mime type handling in Android filepicker.

Before this, the file picker was allowing the user to select
non-text files for notes import. Now this choice is restricted to
*.txt files on Qt and text/plain files on Android and iOS (as it is
not possible to filter single file extensions with the default file
picker).
Type `coinUnit` in `IAccount` to use `CoinUnit`.
Utilize the `SendWrapper` to get BitBox01 mobile-channel-error and
paired-status. This simplifies the `Send` component and better
distinguishes code for bb01/bb02 stuff.
The device info endpoint can return null this can happen when a
BB01 is plugged in but not yet unlocked.
Remove the unused `account` state from the `State` type declaration
because it is never used.

Remove the `paired?` state from the `Send` `State` declaration and also
remove its usage in the return statement. It is always `undefined` which
means `hidden={paired !== false}` is always `true`. This means we can
remove it completely.
The `txProposalErrorHandling` function should **only** return errors and
not set any state. Although this isn't causing an issue right now, the
function should not return an object that is unrelated to errors in
principle. Additionally, this will be necessary for an upcoming refactor
of the `Send` component.

Return only `TProposalError` from the function but make all fields
optional. To keep the logic the same we set `proposedFee` to `undefined`
according to the same logic (ie. `{}` or `{ amountError: ... }` is
returned) but in the `Send` component not in the error handling
function.
Improve the onChange handler of the `NoteInput` component to take a
function that takes a string instead of the `ChangeEvent`.

This will enable us to just pass the `setNote` setter to it when we
refactor the `Send` component to be functional.
As the send-to-self amount is in coins there is no need to show
an estimate symbol in front of the amount.
The fees dropdown show useful information such as expected
time, or with config.frontend.expertFee current cost sat/vB.

This change enables opening the dropdown to see the current fees.

Added disabled to the 'custom' option so it is only selectable if
there is valid txinput data (such as address and amount).
On mobile the total changes when the user selects a point on the
chart so that they can see exact amount at the time.

With scrolling or 2nd finger changing the currency it can happen
that the amount does not update, ending up with a wrong amount/unit.

Fixed by resetting the tooltip value if the currency changes.
 Conflicts:
- frontends/web/src/components/transactions/transaction.tsx

Also had to update:
- frontends/web/src/routes/lightning/send/send.tsx

To fix an error caused by the recent update in eslint rules.
Copy link
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.

untested LGTM

@@ -199,7 +199,7 @@ const Amounts = ({
<Arrow type="send_to_self" />
</span>
)}
{conversionPrefix && (
{(conversionPrefix && !sendToSelf) && (
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@Beerosagos Beerosagos merged commit 9eb6d6e into BitBoxSwiss:staging-ln Dec 10, 2024
7 of 8 checks passed
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.

4 participants