Introduce Money class and refactor currency handling#3157
Open
konstantinullrich wants to merge 60 commits into
Open
Introduce Money class and refactor currency handling#3157konstantinullrich wants to merge 60 commits into
Money class and refactor currency handling#3157konstantinullrich wants to merge 60 commits into
Conversation
- Introduced `Money` class for handling money values with fixed-point precision. - Added parsing and comparison methods to `CryptoCurrency` and `FiatCurrency` interfaces. - Implemented `smartAmountSanitizer` for format normalization. Includes extensive unit tests for validation.
…y` for currency precision
…`Wownero`, and `Zano` wallets
… consistent currency precision
…for consistent currency precision
…r consistent currency precision
… precise currency handling
…r consistent currency precision
…or consistent currency precision
…improved precision and consistency
…for consistent currency precision
…`Money` for consistent and precise currency handling
…ney.zero` and refine `Balance` class for consistency
…consistent and precise currency handling
# Conflicts: # cw_evm/lib/evm_chain_wallet.dart # lib/evm/cw_evm.dart
…ecision and consistency
…apply minor formatting adjustments
OmarHatem28
requested changes
May 4, 2026
Contributor
OmarHatem28
left a comment
There was a problem hiding this comment.
3 files left, but here are the comments so far.
please check them, along with the previous ones
…x typo in trailing widget method name (#3219)
* disallow SP and MWEB for swaps * Simplify address selection in addressForExchange Refactor addressForExchange method to simplify address selection logic. * validate refund and receive address types * localize address validation messages * minor ui fix [skip ci] * minor fix [skip ci] * Revert "localize address validation messages" * fix translations --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
…sion across the codebase, add unit tests for `AmountSanitizer`
OmarHatem28
reviewed
May 11, 2026
…`amount_sanitizer_test.dart`
…th inherited properties, update references accordingly
…kens` lookup, improve maintainability
…ansaction signing methods to avoid inconsistency
… potential runtime errors
… improved consistency and maintainability
… transaction methods for consistency and precision
# Conflicts: # cw_bitcoin/lib/lightning/lightning_wallet.dart # cw_core/lib/crypto_currency.dart # lib/new-ui/widgets/coins_page/assets_history/history_section.dart # lib/new-ui/widgets/coins_page/assets_history/transaction_details_modal.dart # lib/view_model/bridge/bridge_view_model.dart # lib/view_model/dashboard/balance_view_model.dart # lib/view_model/exchange/exchange_view_model.dart
…prove balance calculation consistency across view models
…nfirmedBalanceModal` widget logic
…ity and hashCode overrides to `ERC20Currency` for object comparison
…e string handling, and streamline address validation logic
…Balance.fromRawString` for safer balance parsing
…nd remove unused `evm_erc20_currency.dart` file
…timize balance handling in `zano_wallet`, update Breez SDK to v0.14.0, and implement equality/hashCode for `Currency`
… for consistency
…elevant references in `pubspec.lock`
… `Image.asset` with `CakeImageWidget` in swap address modal
…Solana and EVM wallet transactions
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.
Description
This pull request introduces a new
Moneyclass for fixed-point currency handling, improving precision and consistency across various balance and transaction logic. Key changes include:Moneyclass for consistent currency precision and improved accuracy.Money.Money.Moneyclass with new factories and optimized string formatting.Moneyclass to ensure reliability and correctness.Pull Request - Checklist