Skip to content

Exchange settings - #1727

Merged
i5hi merged 15 commits into
developfrom
exchange-settings
Jan 21, 2026
Merged

Exchange settings#1727
i5hi merged 15 commits into
developfrom
exchange-settings

Conversation

@mocodesmo

Copy link
Copy Markdown
Contributor

1. New Exchange Settings Menu Items

The Exchange Settings screen now includes several new functional menu entries (previously commented out/placeholder):

  • Recipients — Now navigates to a fully functional Recipients screen using the existing RecipientsScreen and RecipientsBloc
  • Transactions — Now shows a dedicated exchange transactions view with buy/sell filtering
  • Default Bitcoin Wallets — Fully functional wallet address management
  • App Settings — User preferences (language, currency, email notifications)
  • Secure File Upload — KYC document upload with status indicators
  • Statistics — New screen showing trading statistics

2. Default Bitcoin Wallets Screen

File: lib/features/settings/ui/screens/exchange/bitcoin_wallets_screen.dart

Complete redesign with functional wallet management:

  • Description text explaining the purpose
  • Three wallet address fields: Bitcoin, Lightning, Liquid
  • Edit/Save/Cancel workflow for each address type
  • Delete functionality per address
  • Address truncation for display (shows first 10 and last 8 characters)
  • Success/Error snackbars for save operations
  • Loading and error states with retry button

3. App Settings Screen

File: lib/features/settings/ui/screens/exchange/app_settings_screen.dart

Enhanced with new functionality:

  • Email Notifications Toggle — New switch with label and description to enable/disable email notifications
  • Improved styling — Updated colors, shadows, and typography
  • Auto-refresh on screen load via initState
  • Fixed enum references (e.g., TextAlign.center, SnackBarBehavior.floating)

4. Secure File Upload Screen

File: lib/features/settings/ui/screens/exchange/file_upload_screen.dart

Completely redesigned with functional upload capability:

  • Upload option card similar to BB-Exchange styling
  • Status indicators:
    • Upload (ready state with upload button)
    • In Review (warning-styled badge)
    • Accepted (success-styled badge)
  • Error display with dismiss button
  • Loading states during user fetch and file upload
  • Success snackbar on successful upload
  • Disabled state when file is already uploaded or under review

5. New Statistics Screen

File: lib/features/settings/ui/screens/exchange/statistics_screen.dart

Brand new screen showing user trading statistics:

  • Order Statistics Section:
    • Buy/Sell Ratio card
    • Buy Statistics (volume, trade count, average price)
    • Sell Statistics (volume, trade count, average price)
    • Total Trading Volume
  • Biller Statistics Section (when available):
    • Stats by payment method/biller
    • Total amount and trade count per biller
  • Loading, error, and empty states
  • "As of" timestamp showing when data was last updated
  • Formatted numbers (K/M suffixes for large values)

6. Transactions Screen Enhancements

Files:

  • lib/features/settings/ui/screens/exchange/transactions_screen.dart
  • lib/features/transactions/presentation/blocs/transactions_cubit.dart
  • lib/features/transactions/presentation/blocs/transactions_state.dart
  • lib/features/transactions/ui/widgets/txs_filter_row.dart

The exchange transactions screen now:

  • Uses the existing TransactionsScreen with an exchangeOnly mode
  • Filters limited to: All, Sell, Buy (hides Send, Receive, Swap, Payjoin filters)
  • Only shows order transactions (no wallet transactions)

7. Recipients Screen

File: lib/features/settings/ui/screens/exchange/recipients_screen.dart

Now fully functional using the existing recipients infrastructure:

  • Reuses RecipientsScreen widget
  • Integrates RecipientsBloc for data management
  • Allows navigation to pay flow when recipient is selected

8. New Localization Strings

File: localization/app_en.arb

~40+ new localization keys added for:

  • Email notifications labels/descriptions
  • Bitcoin wallets screen texts
  • File upload statuses and messages
  • Statistics screen labels (order stats, biller stats, volume, trade count, etc.)
  • Generic retry button label

Navigation Flow

Exchange Settings
├── Recipients → Full recipients list with pay flow
├── Transactions → Exchange-only transactions (buy/sell orders)
├── Default Bitcoin Wallets → Manage BTC/Lightning/Liquid addresses
├── App Settings → Language, Currency, Email Notifications
├── Secure File Upload → KYC document upload with status
├── Statistics → Trading statistics dashboard
├── Referrals → (existing)
├── Security → (existing)
├── Account → (existing)
└── Log Out → (existing)

…nagement

- Introduced email notifications toggle in exchange app settings with corresponding localization.
- Enhanced the ExchangeBitcoinWalletsScreen to manage default wallet addresses with improved UI and feedback mechanisms.
- Implemented file upload functionality in ExchangeFileUploadScreen, including error handling and user feedback.
- Added statistics screen for exchange with relevant data display and localization support.
- Updated various models and state management to accommodate new features.
- Updated TransactionsCubit to accept an exchangeOnly parameter for filtering transactions.
- Modified TransactionsState to include exchangeOnly state and adjust available filters accordingly.
- Adjusted the TransactionsScreen to initialize TransactionsCubit with the new parameter.
- Updated TxsFilterRow to utilize the available filters based on the exchangeOnly state.
- Added functionality to navigate to the PayRoute with the selected recipient when a recipient is chosen.
- Introduced RecipientViewModel to facilitate passing recipient data during navigation.
- Added recipientType parameter to updateMyRecipient method for better API integration.
- Updated deleteDefaultWallet method to include walletType and address parameters.
- Adjusted related use cases and cubit to accommodate new parameters for improved wallet management.
- Enhanced the KYC document upload functionality to use base64 encoding for file data.
- Updated the API request structure to include file type and size information.
- Introduced new models for managing KYC document statuses and integrated them into the user summary.
- Modified the file upload UI to support single file uploads and reflect the current upload status.
- Added localization for success and status messages related to KYC document uploads.

@kumulynja kumulynja left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Quickly saw these two things already, should review the rest still too.

Comment thread lib/core/exchange/data/datasources/bullbitcoin_api_datasource.dart
Comment thread lib/features/settings/ui/screens/exchange/recipients_screen.dart Outdated
- Changed the KYC document upload method to utilize multipart form data instead of base64 encoding.
- Updated the API request structure to remove file type and size parameters, focusing on file upload via FormData.
- Enhanced error handling to check for various error indicators in the API response.
- Added KYC document status handling in user summary mapping.
- Updated file upload state to include user data loading status.
- Improved UI interactions based on KYC document upload status, allowing re-upload for rejected files.
- Localized messages for KYC upload statuses, including a new message for rejected uploads.
@mocodesmo

Copy link
Copy Markdown
Contributor Author

this is ready to be merged and for testing

kumulynja and others added 3 commits January 17, 2026 15:16
@mocodesmo

Copy link
Copy Markdown
Contributor Author

@kumulynja is this pr ready to go after your changes?
let me know if anything else is required from my side

@kumulynja

Copy link
Copy Markdown
Contributor

@kumulynja is this pr ready to go after your changes?
let me know if anything else is required from my side

Yeah, I focused the review and commits mostly on the recipients stuff and that should be good now. The rest is new and should be good for now too 👍

@i5hi
i5hi merged commit 17a2bc2 into develop Jan 21, 2026
1 check passed
@thibistaken
thibistaken deleted the exchange-settings branch March 19, 2026 08:52
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