-
Notifications
You must be signed in to change notification settings - Fork 244
feat(kyc): signing UI BLoC #3160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…into add/kyc-pre-implementation
Rework UI button widgets (e.g. `UiPrimaryButton`) to bring in line with Flutter layout best practices. These changes will be required for full localisation support since we will need dynamic width buttons.
…t and show result in dialog - Replaced inline result display with a dialog using AlertDialog - Dialog content is now wrapped in a Column with mainAxisSize.min and 32px padding for better presentation - Refactored screen layout to include PageHeader (Back to Wallet) to match Send and Receive screens
…ation and result states - Introduced a complete message signing flow using Bloc architecture - Added MessageSigningBloc, events, and state with Equatable integration - Implemented multi-step UI: - Signing form with address selector, message input, QR, and paste actions - Confirmation step with address and message preview and acknowledgment checkbox - Result card showing signed message and sharing options - Extracted form, confirmation, and result views into dedicated widgets for clarity - Enhanced UI styling with unified card designs and split field containers
…g strings - Applied new UI changes to message signing form - Localized text strings based of feedback
# Conflicts: # assets/translations/en.json # lib/bloc/auth_bloc/auth_bloc.dart # lib/generated/codegen_loader.g.dart # lib/shared/ui/ui_primary_button.dart # lib/shared/widgets/connect_wallet/connect_wallet_button.dart # lib/shared/widgets/disclaimer/disclaimer.dart # lib/views/bitrefill/bitrefill_button.dart # lib/views/bitrefill/bitrefill_button_view.dart # lib/views/dex/simple/form/tables/orders_table/grouped_list_view.dart # lib/views/fiat/fiat_page.dart # lib/views/market_maker_bot/coin_search_dropdown.dart # lib/views/market_maker_bot/coin_selection_and_amount_input.dart # lib/views/wallet/coin_details/coin_details_info/coin_details_common_buttons.dart # lib/views/wallet/coin_details/faucet/faucet_button.dart # lib/views/wallet/coin_details/withdraw_form/pages/failed_page.dart # lib/views/wallet/coin_details/withdraw_form/widgets/send_complete_form/send_complete_form_buttons.dart # lib/views/wallet/coin_details/withdraw_form/widgets/send_confirm_form/send_confirm_buttons.dart # lib/views/wallet/wallet_page/wallet_main/wallet_manage_section.dart # lib/views/wallets_manager/widgets/wallet_list_item.dart # packages/komodo_ui_kit/lib/src/buttons/ui_primary_button.dart # packages/komodo_ui_kit/lib/src/images/coin_icon.dart
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| Coin _createHeaderCoinData(BuildContext context, List<T> list) { | ||
| final firstCoin = getCoin(context, list.first); | ||
| final sdk = GetIt.I<KomodoDefiSdk>(); | ||
|
|
||
| final totalBalance = list.fold<BalanceInfo>(BalanceInfo.zero(), ( | ||
| sum, | ||
| item, | ||
| ) { | ||
| final coin = getCoin(context, item); | ||
| final coinBalance = sdk.balances.lastKnown(coin.id) ?? BalanceInfo.zero(); | ||
| return sum + coinBalance; | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Avoid multiplying balances when building grouped order headers
The header coin uses list.fold to add sdk.balances.lastKnown(coin.id) for every item in the group. Since each group consists of orders for the same coin, the same balance value is added repeatedly and the header’s sendableBalance becomes the real balance multiplied by the number of entries. This causes the UI to display an inflated available balance. Fetch the balance once for the representative coin or deduplicate by coin id before summing.
Useful? React with 👍 / 👎.
| child: UiSecondaryButton( | ||
| text: 'Share', | ||
| onPressed: () { | ||
| Clipboard.setData(ClipboardData(text: signedMessage)); | ||
| ScaffoldMessenger.of(context).showSnackBar( | ||
| const SnackBar(content: Text('Copied to clipboard')), | ||
| ); | ||
| }, | ||
| ), | ||
| ), | ||
| const SizedBox(width: 12), | ||
| Expanded( | ||
| child: UiPrimaryButton( | ||
| text: 'Copy', | ||
| onPressed: () { | ||
| // TODO: Add share logic | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Wire copy/share actions to the correct buttons
In the signed-message result card the button labeled "Share" performs a clipboard copy and the button labeled "Copy" has an empty handler marked // TODO. Users therefore cannot actually share the result and the button they would expect to copy does nothing. Swap the handlers (or implement the missing copy logic) so the actions match their labels and both buttons perform a real action.
Useful? React with 👍 / 👎.
- alias mm2 BestOrder in grouped_list_view to disambiguate - pass required isMobile to CoinDetailsCommonButtons
|
@cursoragent fix review comments |
|
Closing in favor of |
|
Closed in favor of internal branch PR #3161 |
Merge KYC signing UI BLoC work into dev. Opened via CLI.
Note
Introduces message signing feature with BLoC and screens, modernizes button components (flexible sizing + optimistic enabled), and updates wallet UI (new sign button, Bitrefill tooltip, orders table), with new i18n strings and docs.
CoinPageType.BestOrder; add list key.MessageSigningBlocwith events (AddressesRequested,AddressSelected,FormSubmitted, etc.) and state (statuses, selected address, errors, signed message).abbr2Tickernow stripsNFTprefixes in addition to known suffixes.codegen_loader.Written by Cursor Bugbot for commit 03e303d. This will update automatically on new commits. Configure here.