Skip to content

Conversation

@CharlVS
Copy link
Collaborator

@CharlVS CharlVS commented Sep 30, 2025

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.

  • Wallet UI:
    • Add message signing flow: new screen, header, form, confirmation, and result components; integrated "Sign Message" button in coin details; extend CoinPageType.
    • Bitrefill button: localized zero-balance tooltip, stable keys, minor refactor.
    • Orders table: grouped header balance via SDK; alias BestOrder; add list key.
    • Minor UI tweaks: headers/connect wallet padding; wallet/manage buttons use updated keys.
  • State Management:
    • New MessageSigningBloc with events (AddressesRequested, AddressSelected, FormSubmitted, etc.) and state (statuses, selected address, errors, signed message).
  • UI Kit (buttons):
    • Introduce flexible constructors and sizing utils; support Material min sizes; primary button gets optimistic-enabled behavior; secondary/border buttons gain padding/border-radius options.
  • Utils:
    • abbr2Ticker now strips NFT prefixes in addition to known suffixes.
  • i18n:
    • Add strings for message signing, Bitrefill tooltip, and misc labels; regenerate codegen_loader.
  • Docs:
    • Add BLoC naming conventions guide.

Written by Cursor Bugbot for commit 03e303d. This will update automatically on new commits. Configure here.

CharlVS and others added 16 commits March 27, 2025 17:47
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
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 30, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit 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
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🧪 Early access (Sonnet 4.5): enabled

We 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:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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

Comment on lines 101 to +115
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;
});

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 👍 / 👎.

Comment on lines +87 to +103
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
},

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 👍 / 👎.

cursor[bot]

This comment was marked as outdated.

- alias mm2 BestOrder in grouped_list_view to disambiguate
- pass required isMobile to CoinDetailsCommonButtons
@CharlVS
Copy link
Collaborator Author

CharlVS commented Sep 30, 2025

@cursoragent fix review comments

@CharlVS
Copy link
Collaborator Author

CharlVS commented Sep 30, 2025

Closing in favor of KomodoPlatform:feat/kyc-signing-ui-bloc which re-opens this work as an internal branch PR: #3161

@CharlVS
Copy link
Collaborator Author

CharlVS commented Sep 30, 2025

Closed in favor of internal branch PR #3161

@CharlVS CharlVS closed this Sep 30, 2025
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.

3 participants