Open
Conversation
ce4fb8e to
eda429f
Compare
SomberNight
reviewed
Apr 18, 2026
62db370 to
d8dfce5
Compare
…imal point and extra_precision up to AmountEdit
…to encapsulate fx base unit and precision, extra_precision now a callable and retrieved dynamically. BTCAmountEdit extended with millisat_precision option kwarg to allow 3 digits extra precision.
add amount_msat parameter and make mutually exclusive with amount_sat
qt: send_tab LN checks millisat precision
…precision on send_tab if recipient is onchain
…with parameter combinations to constructor.
allow int|None in format(Milli)Sats
…oiceParser, QEFX, QEWallet
QEConfig.satsToUnits to QEConfig.amountToBaseunitStr with the latter now also taking a QEAmount instance
Using javascript or QML `int` type is a long-standing issue, as there is not enough range to express millisats or even sats. A short summary of the issues: - integers in javascript context have a max range of +/- 2^54-1, which allows 21M BTC expressed in sats, but not in msats. - QML `int` properties have a max range of +/- 2^31-1, which only allows 21 BTC expressed in sats, 21 mBTC expressed in msats - `int` parameters declared in the `pyqtProperty` and `pyqtSlot` decorators have a max range of 2^31-1, although this is somewhat alleviated in the QML->Python direction by using `q(u)int64`. Returning a `q(u)int64` does not work around the `int` limitation In most of the QML code, `QEAmount` is already used for storing and passing around BTC values. The only exception is where amounts are compared (e.g. invoice amount < available balance etc), so the `<`, `>`, `<=`, `>=` and `!=` operators, and where these operators are implied, like `Math.min()` and `Math.max()` This commit delegates these operators to python scope.
d8dfce5 to
102df84
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
support millisat precision throughout the codebase.
ints are passedDecimalis used on the GUI side where it's easier to assume sats are the base unitsatandmsatfields/parametersQEAmountis now synced between sats and millisats, simplifying assumptions and reducing if-else checksshould fix #6253, #10412