Skip to content

Conversation

@DRadmir
Copy link
Contributor

@DRadmir DRadmir commented Nov 25, 2025

TODO:

  • Localization
Simulator Screenshot - iPhone 17 Pro - 2025-11-28 at 14 08 24 Simulator Screenshot - iPhone 17 Pro - 2025-11-26 at 13 49 26

Fix: #1416

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @DRadmir, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses an issue where non-GatewayError types crossing the Rust-Swift FFI boundary resulted in unhelpful error messages. By introducing explicit error catching and conversion to GatewayError.NetworkError in key fee estimation services, this change ensures that users receive localized and understandable error descriptions, improving the overall user experience and maintaining FFI type safety.

Highlights

  • Improved Error Handling: Implemented do-catch blocks in the getFee and getFeeData methods across BitcoinService, CardanoService, and PolkadotService to standardize error handling for fee estimation.
  • FFI Compatibility: Ensured that all errors originating from underlying operations are caught and re-thrown as GatewayError.NetworkError, making them compatible with UniFFI's FFI boundary requirements between Rust and Swift.
  • Enhanced User Experience: Preserved error.localizedDescription during error conversion to provide users with clear, localized, and user-friendly error messages, preventing generic technical errors from being displayed.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to improve error handling for UniFFI by wrapping errors into GatewayError. While the goal is valid, the implementation introduces some issues. Specifically, it uses GatewayError.NetworkError for all types of errors, which is semantically incorrect and can be misleading. Additionally, the error wrapping logic is duplicated across multiple services. My review includes suggestions to use a more appropriate error type and to centralize the error handling logic to improve code quality and maintainability.

@DRadmir DRadmir marked this pull request as draft November 25, 2025 09:55
@DRadmir DRadmir force-pushed the 1416-improve-dust-threshold-error branch 2 times, most recently from 8fde989 to a25d4eb Compare November 25, 2025 10:51
@DRadmir DRadmir self-assigned this Nov 25, 2025
@DRadmir DRadmir force-pushed the 1416-improve-dust-threshold-error branch from a83f539 to c16338b Compare November 25, 2025 17:30
Introduces a new InfoSheetType for dust threshold errors and updates error handling in transfer and info sheet flows to support it. Refactors ChainCoreError to simplify dust threshold representation and error mapping. Updates localization strings for dust threshold errors and adds a new 'no data available' message in all supported languages.
@DRadmir DRadmir force-pushed the 1416-improve-dust-threshold-error branch from a3e33ce to 29d3701 Compare November 28, 2025 09:09
@DRadmir DRadmir marked this pull request as ready for review November 28, 2025 09:12
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.

Improve dust threshold error

2 participants