* feat: introduce BaseUnit provider for money settings with aspect-based notifications and add unit tests
* test: expand use_base_unit_provider_test with comprehensive scenarios for BaseUnitConfig behaviors
* feat: improvements covering solana nfts(send, ownership badge, persistent imports etc), closing emptied token accounts and other fixes from patch
* feat: more improvements for nfts including security hardening
* fix: display error in full
* fix android CI
* fix: address book wallet contacts tab not updating after wallet changes
* feat: add page open listener for contact list and handle concurrent calls to fetch contact list
* fix android CI
* fix: harden walletconnect auth so a connected session won't transfer on dApp when wallet is switched within the app
* refactor: improve session mgmt and better error handling, also added a loader to the listing page
* feat: switch to newer id for solana dapps connections and fix requests not triggering
* fix android CI
* fix: duplicate outgoing tx for jup swaps and stuck pending state
* fix solana security risk by handling duplicate token symbols in wallet transactions
* feat: implement additional cost handling for pending transactions in Solana wallet.
* fix: Items on security audit list for solana wallet
* refactor: streamline fee payer index handling and improve error logging
* fix: verifySignature for solana and handle wrong mint on default token
* fix: token decimals defaulting to zero and breaking amount parsing in solana
* fix: use token mask in tx history
* refactor: apply lint to modified code
* fix: merge conflicts
* fix: use Money and mint decimals when parsing sol swaps
* test: add unit tests for SPL token amount handling and parsing
* test: add more tests
* fix: update decimal handling for fetched token and remove unused fields
The unchecked background resolved to colorScheme.surfaceContainerHighest,
which is pure white in LightTheme, so the unselected checkbox was an
invisible white disc on near-white list rows. In light brightness use
onSurfaceVariant with alpha 80 instead; dark themes are unchanged.
* fix android CI
* feat: add anypay core models, parser and routing engine
* feat: add anypay resolver, anypay service and wallet switch service
* refactor: route the send page payment flow through anypay service
* fix: show message when there's no swap providers for a pair and reset the trade guard on dismissal
* refactor: merge the swap from network and send to network decision pages together and clean up anypay widgets
* feat: reapply deep links to a currently open send flow and register the solana scheme
* feat: add support for zcash address detection to anypay and other minor fixes
* refactor: remove trailing icon
* feat: hide swap flow for sp and mweb addresses
* feat: enhance zcash address detection and deeplink handling
* fix: pin bitcoin_base
* refactor: Move the anypay decision navigation out of the send page and address minor review comments
* refactor: Move the anypay decision navigation out of the send page and address minor review comments
* feat: handle exception in switch service and mvoe balance compute to call site
* refactor: combine anypay entry points to one and extract selected mode widget
* fix: tx priority for doge
* chore: add dogecoin to isElectrumWallet util
* fix: annoying mobx error
---------
Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
* fix android CI
* feat: add anypay core models, parser and routing engine
* feat: add anypay resolver, anypay service and wallet switch service
* refactor: route the send page payment flow through anypay service
* fix: show message when there's no swap providers for a pair and reset the trade guard on dismissal
* refactor: merge the swap from network and send to network decision pages together and clean up anypay widgets
* feat: reapply deep links to a currently open send flow and register the solana scheme
* feat: add support for zcash address detection to anypay and other minor fixes
* refactor: remove trailing icon
* feat: hide swap flow for sp and mweb addresses
* feat: enhance zcash address detection and deeplink handling
* fix: pin bitcoin_base
* refactor: Move the anypay decision navigation out of the send page and address minor review comments
* refactor: Move the anypay decision navigation out of the send page and address minor review comments
* feat: handle exception in switch service and mvoe balance compute to call site
* refactor: combine anypay entry points to one and extract selected mode widget
---------
Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
* fix android CI
* feat: Migrate EVM, Sol and Tron tokens to SQL
* handle rename edgecase
* refactor: enhance token migration logic and improve database handling
* Randomize coin selection with single random draw
The greedy selection walked the unspent pool in a predictable order (address generation order, then per-address server order), a fingerprint an analyst can exploit. Shuffle the pool before the accumulate-until-covered loop so the input set is chosen non-deterministically (single random draw). MWEB coins are still kept last.
Branch-and-bound (changeless exact match) is a larger follow-up.
* Add BnB + SRD coin selection primitives
Pure, wallet-independent coin selector: branch-and-bound for an exact
changeless match within the cost-of-change window, single-random-draw
fallback (shuffled, injectable RNG) when no exact match exists, and
selectCoins tying them together over effective values.
This is the basis for replacing the greedy accumulation in _createUTXOS
so sends produce no change when possible and a non-deterministic
selection otherwise. Validated with dart test (9 cases); wiring into
_createUTXOS is a separate step.
* Use BnB changeless matching in coin selection
Before the shuffled greedy walk, run branch-and-bound over effective
values (value minus per-input fee cost) looking for an input set whose
excess over amount plus fee stays below dust. When found, order those
inputs first and cap the walk at their count: the caller then computes
a change below dust, drops the change output, and absorbs the residue
into the fee, producing a changeless transaction with no residual
change fingerprint.
When no match exists, selection falls back to the shuffled pool, which
the greedy walk turns into a single random draw. BnB is skipped for
sendAll, forced input counts and pools holding MWEB coins.
changelessMatch filters non-positive effective values and maps indices
back to the original pool.
* Cover changeless fee bounds and BnB termination
Assert the end-to-end arithmetic the wallet performs around a
branch-and-bound match: with the 68/34/10 vBytes model, the leftover
the caller absorbs into the fee is never negative (no re-selection
loop) and never exceeds the dust limit (bounded fee overpay).
Also pin termination: a large pool with no possible match returns null
through the maxTries cap instead of exploring the full search tree.
* Use a secure RNG for coin selection randomness
The selection shuffle and the single-random-draw fallback exist to be
unpredictable, so seed them from Random.secure() instead of the default
PRNG, matching what Core and bdk use for coin selection. Pool sizes are
small, so the cost is negligible. Tests keep injecting a seeded Random
for determinism.
* Randomize RBF and payjoin input candidate order
Two secondary paths still consumed unspentCoins in wallet scan order
(address generation order, then per-address age), the same predictable
order removed from the main selection path:
- replaceByFee walked the unused-UTXO list in scan order when the fee
bump needed extra inputs
- the payjoin receiver handed input candidates to the payjoin library
in scan order, letting ties inside its selection mirror that order
Shuffle both with a secure RNG so no input-selection path exposes the
wallet's address or coin age ordering.
* ci: skip Linux PR build on forks (no secrets access)
* Account for script-type sizes in changeless matching
* Keep coin selection order stable within a transaction build
* Set anti-fee-sniping locktime on bitcoin sends
Current tip (exact-tip) via shared helper, wired into normal sends (path A) and payjoin/PSBT (path B). 0 when unsynced. Converges with the exact-tip cluster (payjoin-cli, ldk-node, Bull Bitcoin) and skips the ~10% backdate.
* Update cw_bitcoin/lib/locktime.dart
Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
* Update cw_bitcoin/lib/locktime.dart
Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
* Update cw_bitcoin/lib/locktime.dart [skip ci]
---------
Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
* fix: sanitize Electrum fee estimates
* chore: drop test changes from this PR
Removes the test additions/modifications introduced by this branch so the
test design is left to the maintainers. Production code is unchanged.
* fix: validate EVM restore mnemonics
* chore: drop test changes from this PR
Removes the test additions/modifications introduced by this branch so the
test design is left to the maintainers. Production code is unchanged.
* fix android CI
* fix: handle the parser seeing chainless QRs in the old flow as belonging to the current wallet, causing the error jack reported
* fix: handle network switch when anypay is interrupted mid flow and currency is changed