Commit Graph
156 Commits
Author SHA1 Message Date
OmarHatem 0e4855132c minor fix [skip ci] 2026-01-15 16:52:07 +01:00
David AdegokeandGitHub 9bac419cb7 feat: disable automatic node switching (#2807) 2026-01-15 14:43:00 +01:00
Omar HatemandGitHub 46df990018 ignore reown connection exception [skip ci] 2025-12-27 01:40:47 +01:00
Konstantin UllrichandGitHub f122ce0c57 fix: handle unexpected ViewModel in ledger connection process (#2716)
* fix: handle unexpected ViewModel in ledger connection process

* fix: add missing exception handler for `_QueuedFuture.execute` in `exception_handler.dart`
2025-12-12 17:32:07 +02:00
OmarHatem ae81b11f99 minor fixes [skip ci] 2025-11-28 19:14:36 +01:00
1b354c70d2 CW-1290-Add-Duress-pin-feature (#2664)
* add duress PIN feature

* add localization

* Update configure.dart

* Update configure.dart

* add duress PIN validation logic

* - fix error popup
- put behind a feature flag

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
2025-11-22 19:24:46 +01:00
OmarHatem 63136ec47a ignore useless error [skip ci] 2025-11-21 01:50:59 +01:00
OmarHatem 954ac34c5b minor fixes [skip ci] 2025-11-17 18:59:56 +01:00
238022c466 CW-1208: Pay Anything EVM enahancements (#2600)
* feat: Pay Anything EVM enahancements

* ifx: Add baseEth to address validator switch case

* fix: Error detecting other wallet types

* feat: Preserve QR amount and other data through evm chain selection flow

* Update container color to surfaceContainer

* feat: Add support for Bitcoin Lightning Network detection

- Identify Base QR codes when scanned
- Display all available currencies for network
- Enhance detector to recognize lightning addresses

* fix: Update token selection for currently selected wallet

* fix: Improve token matching logic for EVM networks

* feat: Update selected currency when wallet is switched

* ui: Add chain badge to the swap confirmation bottomsheet

* fix: Asks to switch wallets even if the current wallet type is the same as the QR. Fix merge conflicts too

* fix: Handle matching logic internally and general cleanups

* fix: Terminate flow if address is not a valid parsed address

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
Co-authored-by: tuxsudo <tuxsudo@tux.pizza>
2025-11-11 21:15:54 +01:00
2da3ba5730 CW-1194-Add-Arbitrum-Wallet (#2587)
* feat: initialize cw_arbitrum package with essential files

- Implement ArbitrumClient for transaction handling
- Add ArbitrumWallet and related classes for wallet management
- Establish transaction history and info classes for Arbitrum transactions
- Add ArbitrumWalletService for wallet operations and management

* feat: Add arbitrum related secrets to workflow

* feat: Add nodes for arbitrum

* feat: Add Arbitrum support to cryptocurrency handling

* refactor: Update Arbitrum currency references from 'ARB' to 'ETH'

* feat: Add Arbitrum support to wallet type and transaction handling

* feat: Add Arbitrum URL schemes to Android and iOS configurations

* feat: Add Arbitrum SVG icons and a WebP image

* feat: Setup Arbitrum proxy

* fix: Add localization

* feat: Integrate Arbitrum support across various configurations and files

- Updated cakewallet.bat to include Arbitrum in app configuration.
- Added Arbitrum node list to pubspec_base.yaml.
- Modified Android, iOS, Linux, and macOS app configuration scripts to support Arbitrum.
- Introduced Arbitrum output path and generation logic in configure.dart.
- Enhanced wallet type and pubspec generation to include Arbitrum.
- Added Arbitrum-related secrets in secret_key.dart.

* feat: Enhance Arbitrum integration with new URI class and updates across various components

- Introduced ArbitrumURI class for handling Arbitrum payment URIs.
- Updated seed validator, wallet creation service, and other components to support Arbitrum.
- Added Arbitrum node handling in default settings migration and node list management.
- Enhanced preferences and settings store to include Arbitrum-specific configurations.
- Updated QR utility and token utilities to accommodate Arbitrum functionalities.

* feat: Add Arbitrum support to various buy providers

- Updated DFXBuyProvider, KryptonimBuyProvider, OnRamperBuyProvider, and RobinhoodBuyProvider to include Arbitrum wallet type and blockchain references.
- Enhanced integration for Arbitrum across multiple components to ensure consistent support.

* feat: Implement Arbitrum support in wallet selection and settings

- Added Arbitrum wallet type handling in common test flows and wallet services.
- Integrated Arbitrum icons in desktop wallet selection and menu widgets.
- Updated privacy settings to include ArbiScan options.
- Enhanced key service to support Arbitrum private and public key retrieval.

* feat: Expand Arbitrum support across various view models and components

- Integrated Arbitrum wallet type handling in advanced privacy settings, transaction details, and wallet management.
- Added Arbitrum-specific methods for transaction and wallet creation, restoration, and fee management.
- Updated dashboard and home settings to accommodate Arbitrum functionalities, including token management and transaction display.
- Enhanced exchange and send view models to support Arbitrum transactions and currency handling.
- Included Arbitrum in wallet address list and privacy settings for improved user experience.

* refactor: Simplify token initialization in Arbitrum wallet service

- Removed the migration flag from the addInitialTokens method in ArbitrumWalletService.
- Updated addInitialTokens method in ArbitrumWallet to handle existing tokens more efficiently.
- Enhanced initial token retrieval logic in DefaultArbitrumErc20Tokens to prioritize iconPath assignment.
- Improved token update logic in BaseWallet for consistency across wallet services.

* chore: Update Dart SDK constraints in pubspec.yaml

* fix: Update file paths for arbitrum assets

* fix: Correct box name formatting in Arbitrum wallet initialization

* Update .github/workflows/pr_test_build_android.yml [skip ci

* Update .github/workflows/pr_test_build_android.yml

* fix: Add missing evm params

* fix: Remove duplicate method declaration

* refactor: simplify isSwapsXyzSendingEVMTokenSwap check

* fix: Update arbitrum configs with sql storage update

* feat: Add estimated fee retrieval for Arbitrum and revamp priority fee handling for EVMChainWallet

* refactor: Update transaction priority handling and estimated fee calculations across EVMChain chains, also remove priority fee levels for Arbitrum

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2025-11-06 00:30:23 +01:00
cyanandGitHub 76876181e5 feat: initial hive -> SQLite (#2502)
* feat: initial hive -> SQLite

Includes migration script and initial work done to
remove dependency on hive generators.

Also contains some refactoring to make sync code
async.

Features new dev screen that lists all SQLite tables

Aspects that need testing:
- backups (from this version, and from previous versions as well)
- wallet loading / wallet list
- almost everything else
- renaming
- deletion
- sorting in wallet list
- wallet groups
- wallet seed/keys
- wallet switching
- wallet creation / restore - all methods
- wallet address page
- hardware wallet connection (and prompts from mall screens)
- contacts
- advanced settings in wallet creation
- derivation paths
- some minor wownero fixes
- base, hardware wallets

* fix: build errors

* fix: Bad state: No element in backup restore

* address comments from review

* fix: HardwareWalletType
2025-10-31 22:37:15 +01:00
2a74317aff Add Base Wallet (#2558)
* chore: Create Base package template

* chore: Update configuration scripts and dependencies to include 'base' coin support

* chore: Update pubspec.yaml, adjust SDK constraints, and add new dependencies

* feat: Add support for base wallet type and cryptocurrency in related configurations

* feat: Implement BaseWallet and DefaultBaseTokens classes for managing base cryptocurrency transactions

* feat: Add BaseTransactionHistory and BaseTransactionInfo classes for handling base cryptocurrency transaction data

* feat: Implement BaseClient, BaseWalletService, and BaseMnemonicIsIncorrectException

* feat: Setup base proxy for main package and adjust token class name

* feat: Setup initial base node configuration

* feat: Integrate support for base wallet type across various functions and services

* feat: Add base support to exchange and outputs

* feat: Add base wallet type integration to wallet creation and node management

* feat: Add base support to transaction details and transaction list item

* feat: Implement BaseURI class and add base support across wallet creation and keys view models

* feat: Add support for BaseScan preference in settings store

* feat: Integrate Base support into various workflows and documentation

* feat: Addingbase config to windows and secret key support

* feat: Add base support to settings and address handling

* chore: Move walletTypeToCurrency to another file and adjust across codebase

* feat: Add 'basescan_history' string localization

* feat: Remove Cryptocurrency.base, it doesn't have a base currency

* feat: Set eth as native currency

* feat: Enhance Base support across various sending, exchange, transaction details, fees, dashboard and balance

* feat: Integrate Base wallet support in advanced privacy settings and home settings view models

* feat: Add Base wallet support with icon and integration across providers, default settings migration, preferences, wallet connect, settings and token utilities

* feat: Update currency handling to use baseEth for Base wallet integration across various components

* fix: Update default token symbol to ETH in Base wallet transaction model

* refactor: Change default currency references from BASE to ETH across client, transaction info, and wallet components

* feat: Introduce normalizedIconPath for CryptoCurrency to standardize icon retrieval across wallet components

* fix: Include baseEth as a native token in EVMChainClient for currency handling

* chore: Update base_icon.png

* feat: Add more nodes to base_node_list.yml

* refactor: Update wallet icon retrieval to use normalizedIconPath

* chore: Remove unused cases and cleanup impl.

* feat: Add base proxy generation to configure

* refactor: Update base proxy and generation code in configure.dart

* feat: Add missing wallet and mono images

* fix: Wrong image path for pr and add missing base qr image

* feat: Enhance EVMTransactionErrorFeesHandler to parse new insufficient funds error format and calculate transaction fees in ETH and USD

* feat: Add gas price safety buffer for Base chain transactions to improve fee estimation accuracy, also fixes send all not calculating correctly

* Update model_generator.sh [skip ci]

* Update assets/base_node_list.yml [skip ci]

* Update cw_base/lib/default_base_erc20_tokens.dart [skip ci]

* Review fixes

* fixes

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
2025-10-11 04:24:32 +03:00
025fc9154c Pay Anything Flow Enhancements (#2564)
* fix: update Bitcoin and Litecoin Bech32 address patterns for improved detection for pay anything flow

* feat: add Litecoin MWEB address detection patterns for pay anything flow

* feat: Add support for ERC-681 payment scheme to QR and link to exchange send from external QR

* feat: Introduce TokenUtilities to centralize token management across viewmodels

- Added TokenUtilities class to centralize token-related operations for EVM, Solana, and Tron tokens.
- Refactored existing methods in ExchangeTradeViewModel and SendViewModel to utilize TokenUtilities.
- Updated PaymentRequest to include contractAddress.
- Enhanced payment QR scanning to fetch token details for QRs with contract addresses - ERC-681 QR scheme

* fix: Prefill amount with other data when app is brought up via payment deeplink on QR scan

* fix: Reduce trade not created errors WIP

* feat: Add exchange provider logging functionality

* feat: Enhance ERC681URI with amount normalization, prevents parsing issues with various input formats for amounts

* - Use regex from address validator for btc/ltc manual checks
- Add check for solana addresses
- Handle failures in normalizeToInteger method
- fix issue with address only being added when there's an amount

* feat: Trigger pay anything flow when address is pasted via ctrl v or paste input

* fix: remove duplicate registration

* fix: disable text selection in SendCard address field

* feat: Prevent swap option from showing for Mweb and Silent Payment addresses in Pay Anything flow

* refactor: remove notes widget and controllers from swap confirmation bottomsheet

* fix: Issue with tap send all button not responsive, and updateing fiat amount, after wallet syncing is complete if it was previously tapped while wallet was syncing

* fix: Resolve excessive decimal places error with input sanitization and formatting for amount entry

* fix: Add check for already usable amount format to prevent errors with Nano QR scanning

* fix: Improve fiat input handling by preventing unnecessary updates during user input

* fix: Handle potential null case for setReceiveAmountFromFiat

* Update lib/src/widgets/bottom_sheet/payment_confirmation_bottom_sheet.dart

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2025-10-11 04:20:09 +03:00
c51c2dc105 Pay Anything Enhancements (#2529)
* fix: update Bitcoin and Litecoin Bech32 address patterns for improved detection for pay anything flow

* feat: add Litecoin MWEB address detection patterns for pay anything flow

* feat: Add support for ERC-681 payment scheme to QR and link to exchange send from external QR

* feat: Introduce TokenUtilities to centralize token management across viewmodels

- Added TokenUtilities class to centralize token-related operations for EVM, Solana, and Tron tokens.
- Refactored existing methods in ExchangeTradeViewModel and SendViewModel to utilize TokenUtilities.
- Updated PaymentRequest to include contractAddress.
- Enhanced payment QR scanning to fetch token details for QRs with contract addresses - ERC-681 QR scheme

* fix: Prefill amount with other data when app is brought up via payment deeplink on QR scan

* fix: Reduce trade not created errors WIP

* feat: Add exchange provider logging functionality

* feat: Enhance ERC681URI with amount normalization, prevents parsing issues with various input formats for amounts

* - Use regex from address validator for btc/ltc manual checks
- Add check for solana addresses
- Handle failures in normalizeToInteger method
- fix issue with address only being added when there's an amount

* wrap in try/catch just in case [skip ci]

* Update lib/utils/token_utilities.dart

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2025-09-24 20:24:52 +03:00
David AdegokeandGitHub cb9ac69e31 fix: Fix QR Code Icons (#2517)
* fix: Fix QR Code Icons

* Update QR Code images

* fix: QR Codes Wallet Type Images
- Added missing solana qr code image to receive page
- Added wallet type image to QR on AnonPay invoice and donation pages
- Added a getQRImage util for easy access to the qr images

* fix: Update eth_pol image for receive page
2025-09-22 15:56:47 +03:00
cyanandGitHub 2dc95b2bf0 feat: use better embedded Tor (#2453)
* feat: use better embedded Tor

* update docs [skip ci]

* fix: update torch properly add minimum os version for iOS

* fix: use of invalid thread api on iOS

* fix: disable use of lzma and zstd system libraries

* fix: update torch_dart to work on linux
2025-09-05 23:07:26 +03:00
OmarHatem 3dd26c8c08 disable custom background temporarily [skip ci] 2025-08-15 14:33:39 +03:00
328422cfb5 CW-1139-Migrate-CakePay-mobile-to-use-the-new-backend-APIs (#2416)
* migrate to new backend API

* hide value_type filter

* Improve vendor card parsing

* Update country.dart

* Update lib/cake_pay/src/models/cake_pay_card.dart

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>

* Update lib/cake_pay/src/models/cake_pay_card.dart

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>

* address review comments

* fix min limit value

* Update lib/view_model/cake_pay/cake_pay_buy_card_view_model.dart

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>

* refactor denomination handling and min value logic

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2025-08-13 09:07:30 +03:00
cyanandGitHub b8a9863a21 feat: CakeTorSocks respect SOCKS_SERVER (#2444) 2025-08-13 01:00:39 +03:00
OmarHatem 1312bd00de handle more ledger cases [skip ci] 2025-08-04 03:47:52 +03:00
e4806ad141 CW948: feat: bitcoin view-only (#2261)
* feat: bitcoin view-only

* fix: add UR to cw_bitcoin, fix payjoin issue

* feat: add unsignedPsbt to PendingBitcoinTransaction

* wip

* feat: xpub restore from bitcoin URI QR

* feat(dev): debug UR codes [skip ci]

* fix: master fingerprint default in create bitcoin transaction

* fix: handle empty private key in bitcoin transaction building

* fix: show success dialog after btc ur transaction

* fix(ui): remove SP from UI in view only wallet

* fix(cw_bitcoin): tx sending on non-airgap

* fix(cw_bitcoin): disable all non-segwit addresses

* feat(ur): support BBQR for coldcard qr

* flutter 3.27.0 -> 3.27.4

* feat: raw xpub qr support for coldcard q

* fix: update ledger_bitcoin
fix: update switching button

* fix: restore button not showing up after scanning

* feat: commit raw tx (from coldcard Q)

* feat: legacy crypto-psbt support for seed signer

* chore: address comments from review

* fix(cw_bitcoin): disable sp and payjoin for cupcake

* feat: enable DNSSEC BIP353 in PSBT (#2397)

* feat: enable DNSSEC BIP353 in PSBT

* chore: put bitcoin view only behind a featureflag

* fix: update Monero wallet to work with new internal URQR return format

* feat: add "Restore from Cupcake App" option with localized strings

* feat: enable DNSSEC BIP353 in PSBT using dnssec-prover (#2401)

* fix: use dnssec-prover
chore: bump ndk to r28c

* fix: validate DNSSEC proof before updating the UI

* fix: rename button to copy debug info to not hide actions on URQR widget

---------

Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
2025-07-29 17:01:33 +03:00
Konstantin UllrichandGitHub fea63632fe feat: add support for Ethereum EIP-681 URIs in PaymentRequest and implement test coverage (#2375)
* feat: add support for Ethereum EIP-681 URIs in PaymentRequest and implement test coverage

* test: add unit test for EIP-681 URI handling with contract and no chainId [skip-ci]

* fix(CW-1114): rounding error for really large numbers

* fix: wrong decimals for eth fee display

* fix: limit fractional digits to a maximum of `decimals` in `format_fixed` function [skip-ci]

* test: add unit tests for `formatFixed` function
2025-07-17 19:16:54 +03:00
c417207007 CW 882: Integrate Seed Verification Flow To Integration Tests (#1966)
* fix: Generic fixes

* fix: Modify hasSufficientFundsForRent to work for spl transactions

* feat: Integrate seed verification into integration tests

* fix: Adjust workflow file

* chore: Remove previous working directory

* fix: Revert change

* chore: Remove step to setup kvm, already existing in new setup

* chore: Remove a couple of steps from workflow

* chore: Try switching test commands

* fix: Switch back to flutter drive

* fix: Flutter error when running tests with Flutter drive

* feat: Add screenshots to individual test pages and modify integration test script to add a watch dog to prevent infinite running on CI

* feat: Implement transaction success info robot and fix issue with send flow test

* fix: Improve integration testing for exchange flow and clean up logic and resulting errors

* fix: Handle duplicate words for seeds and test restore through seeds

* fix: Optimize implementation for transactions history test

* Skip seed verification when in debug and when not in CI flow

* chore: Remove print statements and add TODOs

* fix: Upgrade version for upload action

* fix: Add missing secrets to testing workflow file

* fix tests not working in latest main [skip slack]

 # Conflicts:
 #	lib/src/screens/wallet_keys/wallet_keys_page.dart

* add zano seed [skip slack] [run tests]

* disable exchange_flow_test.dart [run tests] [skip slack]

* Run tests on linux always (since nobody ever used [run tests])

* fix tests after ui updates

* [skip slack] tests update

* Fixing tests WIP

* Fix create wallet integraiton test flow

* Update and fix Exchange flow test flow

* Switch printV to printToConsole

* Adjustments to the the flows on Send and Exchange

* feat: Modify Exchange and send tests to fit new flow

* fix:
- Pause screenshots for now, results in a super large json response file
- Fix delay on send bottomsheet because of pumpAndSettle animation
- Fix issue with integration test runner script

* fix(integration-tests): Fix issues relating to send flow integration tests.

This change:
- Handles the slider during the send confirmation flow during the send integration test
- Adds the missing seeds for the restore flow to the relevant workflow files

* feat: Enhance Send flow Automation Integration Test Flow

This change:
- Updates test wallet address in CommonTestConstants.
- Modifies startAppFlow to accept a dynamic key.
- Improves waitForSendPage and checkIfSendPageIsVisible methods for better page visibility handling.
- Adds validateWalletBalance method to ensure sufficient funds before sending.
- Enhances transaction success flow handling in SendPageRobot.

* refactor: Update SendPageRobot for improved transaction state handling

This change:
- Adds support for the TransactionCommitted state in the SendPageRobot.
- Removes the handleSendResult method to streamline the send flow.
- Enhances checks for successful transaction completion by verifying navigation to the DashboardPage.
- Improves visibility handling for the contact addition dialog in the transaction success flow.

* chore: Update automated integration test workflow

This change:
- Updates apkl file naming to use sanitized branch names for better consistency.
- Adds a step to output system environment information to aid in troubleshooting.
- Enhances KVM setup with checks to see if device exists and there is proper permission.
- Adjusts working directory references for Android emulator setup.

* chore: Enhance automated integration test workflow

This change:
- Adds cleanup steps for existing emulator processes to ensure fresh environment.
- Updates APK file naming to use sanitized branch names for consistency.
- Enhances debug output for APK file creation and searching, improving visibility during the workflow.

* chore: Modify apk file renaming step in workflow

* chore: Enhance automated integration test workflow

This change:
- Increases timeout for integration tests to 60 minutes.
- Adds a timeout of 90 minutes for the automated integration test job.
- Improves KVM setup with detailed checks and outputs for existing device, permissions, and functionality.
- Adds system resource checks to provide information on memory, disk space, and CPU cores during the workflow.
- Implements error handling for the integration test runner to ensure graceful failure reporting.

* chore: Enhance AVD configuration and emulator management in integration test workflow

* refactor: Improve transaction history flow tests and item visibility checks

This change:
- Enhances the scrolling logic in the CommonTestCases to check for item visibility before scrolling.
- Adds error handling and logging for transaction history checks in TransactionsPageRobot.
- Adds comprehensive item checks and scrolling for more reliable tests.

* refactor: Modify integration test runner for improved error handling and logging

This change:
- Implements error handling and logging throughout the integration test runner.
- Introduces a cleanup function for data directories and signal handling.
- Enhances test execution with retry logic and detailed duration tracking.
- Provides a comprehensive summary of test results, including passed and failed tests with their durations.

* refactor: Update error handling in transaction history flow tests

* refactor: Remove manual emulator startup logic from integration test workflow

This change simplifies the automated integration test workflow by removing the manual emulator startup process, which was previously included to handle cases where no emulator was running. The workflow now focuses on checking the emulator status and gathering device information without attempting to start an emulator manually.

* refactor: Enhance integration test workflow and error handling

* feat: Add emulator readiness checks and enhance send flow tests

This change:
- Modifies the send flow test to send $1 worth of any of the wallet currencies
- Set up switching between test wallet in case there's zero balance in any of the wallets when the test is run
- Add a mini script to check emulator readiness for the tests

* fix: More CI workflow errors for the tests

* refactor: Update emulator readiness checks and error handling in CI workflow

* fix: Readiness check successful but broken pipe when accessing settings service, plus some syntax errors in the workflow

* refactor: Enhance integration tests with improved visibility checks and timing adjustments

This change:
- Adds visibility checks for widgets before interaction in various test flows.
- Introduces consistent pump and settle durations to ensure UI stability during tests.
- Refines scrolling logic to confirm wallet types are visible before selection.
- Updates tap actions to include warnings for missed taps, improving test reliability.

* fix: Issues with confirm seeds and keys Automated test

* fix: Add missing await for tap calls

* fix: Temporarily disable CI workflow and minor cleanup to testflows

* fix: Add missing keys to CI workflow

* chore: Temporarily disable Automation CI

* chore: Cleanup

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
2025-07-17 06:23:04 +03:00
OmarHatem 1a5774da40 ignore OS refusing connection issue [skip ci] 2025-07-16 00:06:40 +03:00
SerhiiandGitHub ef84db5874 Cw 973 in app gift card redemption flow plus UI (#2285)
* refactor: cleanup cake_pay folder

* refactor: add My Cards tab on the main screen

* ui: add user card item

* refactor: cakePay purchase flow

* feat: add user card info

* refactor: auth flow

* refactor: theme data

* revert

* Update qr_widget.dart

* fix: update with new themes

* minor fixes

* feat: put redemption flow under a feature flag

* feat: implement simulated purchasing flow in debug mode

* feat: support LTC and MWEB payments

* Update savings_page.dart

* fix: UI fixes

* add Cake Pay transaction sent bottom sheet

* localization

* Update cake_pay_buy_card_page.dart

* addressing review comments

* fix marge conflicts
2025-07-11 23:56:35 +03:00
OmarHatem d00b272c2c make it more specific [skip ci] 2025-07-03 18:21:58 +03:00
OmarHatem 2ffcb46880 ignore secure storage error [skip ci] 2025-07-03 18:20:46 +03:00
65bb917bfb CW-1094-WalletConnect-Issues (#2318)
* feat(walletconnect): Minor update to WalletConnect tile UI to fix expanded image issue

* feat(walletconnect): Minor update to WalletConnect tile UI to fix expanded image issue

* feat(walletconnect): Enhance WalletConnect EVM chain service.

This change:
- Improves signTypedDataV4 method handing and data parsing in extractPermitData.
- Adjusts UI for One Click Auth requests

* feat(walletconnect): Add redirect to PairingMetadata in WalletKit setup

* fix(walletconnect): Ensure session null checks before handling redirects in EvmChainService

* fix(walletconnect): Add null safety checks for permitData properties in EvmChainService

* refactor(walletconnect): Update WCPairingItemWidget layout and improve error handling for image loading

* fix(walletconnect): Handle break in connection flow triggered by global exception handler when SVGParser fails on invalid SvgData and triggers FlutterError.

* refactor(solana): Remove redundant session request responses and simplify error handling in SolanaChainService

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2025-06-24 05:48:27 +03:00
5082dc20f3 CW-519 Enable built-in Tor (#1950)
* tor wip

* Enable tor on iOS

* Prevent app lag when node is exceptionally slow (usually over tor)

* fix: logic in daemonBlockchainHeight refresh
fix: storing tor state

* Pin ledger_flutter_plus dependency to fix builds

* bump arti version

* wip

* add single httpclient

* route everything I was able to catch trough the built-in tor node

* Enable proxy for http.Client [run tests]

* add tor proxy support to cw_evm, cw_tron and cw_polygon [run tests]

* remove log pollution, cleanup [skip slack]

* fix tests not working in latest main [skip slack] [run tests]

* remove cw_wownero import

* fix build issues

* migrate all remaining calls to use ProxyWrapper
add a CI action to enforce using ProxyWrapper instead of http/http.dart to prevent leaks

* fix tor background sync (will work on test builds after #2142 is merged and this PR is rebased on top)

* wip [skip ci]

* relicense to GPLv3 add socks5 license, build fixes

* use ProxyWrapper instead of http in robinhood

* Revert "relicense to GPLv3"

* feat(cw_bitcoin): support socks proxy and CakeTor

* fix(tor): migrate OCP and EVM over to ProxyWrapper()

* chore: cleanup
fix: show tor loading screen when app is starting

* fix: tor switch properly dismisses fullscreen loading dialog
fix: connectToNode after tor startup on app start

* fix(tor): status check for xmr/wow/zano

* fix(tor): onramper request fix

* fix(api): ServicesResponse is now being cached and doesn't fetch data everytime DashboardViewModel is being rebuilt
fix(tor): do not fallback to clearnet when tor failed.
fix(tor): do not leak connections during app startup
chore: refactor bootstrap() function to be separated into bootstrapOffline and bootstrapOnline
fix(cw_bitcoin): migrate payjoin to use ProxyWrapper

* [skip ci] remove print

* address comments from review

* fix: derusting tor implementation

Instead of rust-based Arti I've moved back to the
OG C++ tor implementation.
This fixed all issues we had with Tor.
- onion services now work
- all requests are going through without random errors
- we don't have to navigate a maze of multiple forks of multiple packages
- fully working `torrc` config file (probably will be needed for Tari).
- logging for Tor client
- and so on.

feat: network logging tab
feat: use built-in proxy on Tails - this should resolve all issues for Tails users (needs testing though)

* fix conflicts with main
bump https to fix build issue
relax store() call

* fix(cw_wownero): tor connection
fix(tor): connection issues

* fix(cw_evm): add missing chainId
fix(cw_core): solana rpc fix

* feat: mark tor as experimental
fix: drop anonpay onion authority
fix: drop fiatapi onion authority
fix: drop trocador onion authority
fix: disable networkimage when tor is enabled
fix: handle cakepay errors gracefully

* fix re-formatting [skip ci]

* changes from review

* Delete android/.kotlin/sessions/kotlin-compiler-2468481326039681181.salive

* fix missing imports

* Update pubspec_base.yaml

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
2025-06-20 22:56:18 +03:00
18c2ba9366 CW-1090-ledger-issues (#2314)
* build: bump ledger_flutter_plus dependencies

* fix: handle connection errors occurring during connecting to a ledger device

* fix: enhance ledger error handling and improve wallet connection reliability

* fix: enhance ledger error handling and improve wallet connection reliability

* feat: add localized strings for "Try again" and update Ledger error handling on auth

* fix: handle rethrow behavior in onAuthenticationStateChange

* fix: improve Ledger error handling and refine error code interpretation

* fix: refine Ledger error code interpretation and enhance error handling [skip-ci]

* add missing ledger error codes

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2025-06-19 20:00:16 +03:00
df88914628 New themes (#2239)
* Add theme base v2

* Initial new theme base files

* Typos

* Fixes

* Update theme files

* feat: Migrate to Material 3 Theming

Foundation, Theme Data Refactor, and First Extension Cleanup Batch.

This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.

These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.

* feat: Migrate to Material 3 Theming.

This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.

* feat: Migrate to Material 3 Theming

Deleting previous theme extensions

* feat: Migrate to Material 3 Theming

Another batch of migrations from existing extensions

* feat: Migration to Material 3 Theming

Third Migration batch for theme extensions

* fwat: Migration to Material 3 Theming

Final Migration batch for previous theme extensions

* Update onboarding hero

* Update button radius

* Add surfaceContainer to light theme

* feat(themes): Migrate to Material 3 Theming

This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use

* feat(themes): Migrate to Material 3 theming

This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles

* feat(themes): Migrate to Material 3 Theming.

This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation

* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards

* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors

* Update border radius --skip-ci

* feat(themes): Migrate to Material 3 Theming.

This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.

* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes

* feat: Add fallback to previous underline styling in central widgets

This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts

* feat(themes): Update warning box colors for dark and light themes

* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.

* feat(themes): Handle themes logic during restore from backup

This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow

* Fix card gradients and spacing

* Fix even more radiuses
Test new icons for navigation_dock.dart

* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images

* Fix incorrect color for light theme

* Fix more hero images and cleanup

* Update text field icons
Fix info box CTA colors
Fix sync indicator colors

* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon

* Update page transitions in router.dart
Fix some colors

* feat(themes): Display label by default for filled textfields

* feat(themes): Refactor theme handling across various components

This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore

* feat(themes): Add animating tagline to the create pin welcome screen

* Revert text fields label temporarily, fix a couple colors, and cleanup some images

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 23:11:45 +03:00
OmarHatem df20e22fae minor: ignore package unreasonable error 2025-05-25 03:59:18 +03:00
Omar HatemandGitHub 914561716d v4.28.0 Release Candidate (#2260)
* v4.28.0 Release Candidate

* Fix Android deeplinking

* minor [skip ci]

* update app versions [skip ci]

* merge main

* - Re-enable SwapTrade
- Hide Keyboard on opening fee selection

* handle old backups import

* - Fix seed type UI
- Temp fix for Deleting Monero wallet

* update build number [skip ci]

* minor nullability handling

* disable payjoin for SP
2025-05-16 13:51:36 +03:00
82e3ebf4fa implement-payjoin (#1949)
* Initial Payjoin

* Initial Payjoin

* More payjoin stuff

* Minor fixes

* Minor fixes

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Fix minor bug causes by data inconsistency in the btc utxos

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Initial Payjoin

* Initial Payjoin

* More payjoin stuff

* Minor fixes

* Minor fixes

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Fix minor bug causes by data inconsistency in the btc utxos

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Fix Rebase issues

* Move PJ Receiver to isolate

* Add Payjoin Setting

* Payjoin Sender are now isolated

* Added Payjoin sessions to tx overview. Fix Fee issue with payjoin

* Clean up code

* Fix taproot for payjoin

* Fix CI Errors

* Add Payjoin UI elements and details page

* Add Payjoin UI elements and details page

* Fix Translations

* feat: Detect Payjoin URIs in pasted text and show to the User sending Payjoin

* feat: rename pjUri to payjoinURI for more code clarity

* Update res/values/strings_pl.arb

Co-authored-by: cyan <cyjan@mrcyjanek.net>

* Update cw_bitcoin/lib/payjoin/manager.dart

Co-authored-by: cyan <cyjan@mrcyjanek.net>

* Update cw_bitcoin/lib/payjoin/manager.dart

Co-authored-by: cyan <cyjan@mrcyjanek.net>

* feat: Disable Payjoin per default

* feat: Disable Payjoin fully if disabled or no Inputs available

* feat: Resume Payjoin if app comes back to foreground

* chore: Revert overly aggressive code formats

* feat: show correct Payjoin amount for receivers

* feat: Improved payjoin status

* feat: Show payjoin errors on payjoin details screen

* deps: update flutter to 3.27.4

* feat: Revert localisations

* bug: Remove duplicate transaction id on payjoin details

* style: remove double await in payjoin sender

* refactor(cw_bitcoin): Refactor method signatures and convert constructor to factory

* refactor(cw_bitcoin): Refactor wallet service and PSBT signer for cleaner code

Removed unnecessary `CakeHive` dependency and refactored `BitcoinWallet` initialization to use `payjoinSessionSource`. Improved code readability in `PsbtSigner` by reformatting lines and simplifying constructor methods for `UtxoWithPrivateKey`.

* fix: Resume Payjoin Sessions and load PJUri after sleep

* feat: Add "Copy Payjoin URL button" to receive screen

* fix: Add "Payjoin enabled"-Box below QR Code on the receive screen

* fix: Set payjoin_enabled color to black independent of the theme

* refactor: Payjoin session management and cleanup unused code.

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
Co-authored-by: cyan <cyjan@mrcyjanek.net>
2025-05-12 20:33:14 +03:00
OmarHatem eccc94a019 temp. ignore secure storage iOS issue 2025-05-05 11:50:04 +03:00
OmarHatem 0188535eb9 Enable error reports without cooldown in testing builds 2025-04-30 10:27:21 +03:00
OmarHatem d86c501fc5 patch: running android related code on other platforms 2025-04-28 07:21:12 +03:00
a7376c3225 Address-formatting-enhancements-MWEB (#2189)
* apply formatting to address book and MWEB

* fix wallet type exception

* Update cw_core/lib/wallet_type.dart [skip ci]

* Update lib/src/screens/contact/contact_list_page.dart [skip ci]

* Update lib/src/screens/contact/contact_list_page.dart [skip ci]

* Update lib/utils/address_formatter.dart [skip ci]

* Update lib/utils/address_formatter.dart [skip ci]

* Update lib/utils/address_formatter.dart

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2025-04-11 19:51:30 +02:00
SerhiiandGitHub 3f25d69244 CW-1021-Address-formatting-enhancements (#2141)
* Implement visual formatting for addresses

* fix minor issues

* Update transaction_details_page.dart

* Update transaction_details_page.dart

* fix multi recipient address formatting

* Update address_cell.dart
2025-04-10 16:16:43 +02:00
cyanandGitHub cbca4c9c77 CW-1024 Improve performance of xmr wallet (#2128)
* - enabled development options in CI builds.
- Implemented caching for account retrieval.
- refactor transaction handling in `dashboard_view_model.dart` to improve efficiency and reduce unnecessary updates in xmr.
- `DevMoneroCallProfilerPage`, for profiling performance of xmr,wow,zano wallet calls.

* use FeatureFlag.hasDevOptions

* prevent crashes in monero_c by using mutexes properly
improve performance of _transactionDisposer
remove unnecessary checks

* remove logging, bring back simplified logic

* update _transactionDisposer on length and confirmation of first and last transaction

* address comments from review

* don't throw unhandled exceptions in unawaited async code

* use cached transaction list in getAllSubaddresses, fix usage of txHistoryMutex

* [DNM] fix: crashes when opening wallet, performance issue when syncing and update dependencies

* Revert "use cached transaction list in getAllSubaddresses, fix usage of txHistoryMutex"

This reverts commit 4c4c33ac6a47603e970a6c8d940e90204525b241.

* Revert "[DNM] fix: crashes when opening wallet, performance issue when syncing and update dependencies"

This reverts commit d7603445ad6ae76d76bf179c34728ce242c8c610.

* Revert "use cached transaction list in getAllSubaddresses, fix usage of txHistoryMutex"

This reverts commit 4c4c33ac6a47603e970a6c8d940e90204525b241.

* update shared_preferences

* improve state management performance by not rendering multiple changes in transaction screen on a single frame

* fix wallet switching
2025-04-03 03:31:25 +02:00
686580ff78 Implement background sync for xmr using flutter_daemon (#2094)
* Implement background sync for xmr using flutter_daemon

* - initialize app config in background thread
- initializeAppConfigs without loading the wallet.

* - properly do awaited calls in methodChannel
- prevent locking main thread during background sync

* add back background sync debug page
fix issues caused by xmr wallet being view only (and read only)

* changes from review
improve starting of bgsync task

* update stopBackgroundSync, await listener functions, ensure that listener always start (call _start in constructor)

* DO-NOT-MERGE: extre verbose monero logs

* stop background service when app is being opened

* improve monitoring of background sync

* update flutter_daemon to ensure network constraint
prevent throwing errors on isBackgroundSyncEnabled
check network before syncing

* Update lib/main.dart

* revert Update main.dart [skip ci]

* continously run network check

* disable charging requirement,
fix status reporting of background sync in UI

* Refactor background sync logic, and add UI notifications for battery optimization. Updated flutter_daemon version modified build.gradle for signing config to allow testing in both release and debug modes.

* verbose monero only when requested in code.
Do not start background sync when battery optimization is on

* fix background sync mode not properly reflecting state changes

* drop unnecessary dependency

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2025-03-21 19:22:00 +02:00
OmarHatem 1e4dbb5bc9 Ignore packet loss errors [skip ci] 2025-03-10 14:13:21 +02:00
OmarHatem 2c856383a7 ignore permission denied error [skip ci] 2025-02-20 20:26:52 +02:00
Matthew FosseandGitHub ad20d2c3a9 nano-gpt support any crypto (#2005) 2025-02-11 13:07:59 +03:00
OmarHatem 471a2af527 minor fixes [skip ci] 2025-01-03 13:49:15 +02:00
Omar HatemandGitHub 214fc7113c Fix electrum unspent coins error (#1912)
* Refresh unspent coins before creating a transaction

* disable seed verification in debug mode [skip ci]
2024-12-29 23:48:53 +02:00
Omar HatemandGitHub c6b9f054cc Switch to SSL for Cake's Electrum and Monero nodes (#1899)
* Force SSL for Electrum and Monero nodes
Some Cleanup

* minor [skip ci]

* potential fix for transactions not cleared correctly [skip ci]

* minor fix [skip ci]
2024-12-25 21:27:46 +02:00
OmarHatem ac1c198940 minor 2024-12-19 22:48:52 +02:00
ae80fb3b55 CW-774: Enforce Seed Verification (#1874)
* feat: Switch UI for seeds display

* feat: Add localization for disclaimer text

* fix: Modify color for warning on seeds screen

* Fix: Adjust UI styling for seed page

* chore: Revert podfile.lock

* Fix column colors

* Fix more colors

* Fix more colors and update strings

* feat: Enforce Seed Verification Implementation

* fix: Error extracting seed words in Japanese because of spacing type used

* fix: Modify styling for copy image button

* fix: Add back button to the seed page and adjust styling to seed verification question text

* Update seed verification image [skip ci]

* Update description text weight [skip ci]

* Make seed page wider

* Seed page changes

---------

Co-authored-by: tuxpizza <tuxsudo@tux.pizza>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2024-12-14 02:55:49 +02:00
OmarHatem 35cf4a716f separate CI steps more clearly
Add more info to error reports
2024-12-10 14:06:56 +02:00