Skip to content

fix(withdraw): add USD fiat values alongside amounts#3274

Merged
ca333 merged 6 commits intodevfrom
fix/withdraw-form-values
Oct 29, 2025
Merged

fix(withdraw): add USD fiat values alongside amounts#3274
ca333 merged 6 commits intodevfrom
fix/withdraw-form-values

Conversation

@takenagain
Copy link
Copy Markdown
Contributor

@takenagain takenagain commented Oct 28, 2025

Closes #2644 by adding the last remaining detail: fiat amount alongside fee and transaction amounts.

Mobile

image
Further mobile examples image image

Web/Desktop

image image

Note

Adds a reusable AssetAmountWithFiat widget and updates withdraw preview to show USD fiat for amount and fee with a responsive layout.

  • Shared Widgets:
    • AssetAmountWithFiat: new widget to display crypto amount with optional coin symbol and USD fiat (from SDK pricing), supporting auto-scroll and selectable text.
  • Withdraw Preview UI:
    • WithdrawPreviewDetails: now uses AssetAmountWithFiat for amount and fee to show fiat values.
    • Responsive layout with width-based row/stack switching and dynamic padding (widthThreshold, minPadding, maxPadding).
    • Adjusted rows (label/value flex), and improved presentation of recipients and optional memo.

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

also decrease perimeter padding and increase vertical padding
@takenagain takenagain self-assigned this Oct 28, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 28, 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 (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/withdraw-form-values

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

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

@takenagain takenagain changed the title fix(withdraw): add USD fiat values alongside fix(withdraw): add USD fiat values alongside amounts Oct 28, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 28, 2025

Visit the preview URL for this PR (updated for commit 0f4bc96):

https://walletrc--pull-3274-merge-3hpuvrxj.web.app

(expires Tue, 04 Nov 2025 16:31:05 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

@takenagain takenagain force-pushed the fix/withdraw-form-values branch from 161346d to 257e0af Compare October 28, 2025 08:38
@takenagain takenagain marked this pull request as ready for review October 28, 2025 09:29
Copilot AI review requested due to automatic review settings October 28, 2025 09:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the withdraw form by adding USD fiat values alongside cryptocurrency amounts for fees and transaction totals. The changes improve user experience by providing better context about transaction costs in familiar currency.

Key changes:

  • New AssetAmountWithFiat widget displays crypto amounts with their fiat equivalents
  • Responsive layout implementation with dynamic padding and row/column switching
  • Import reorganization for better code structure

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/shared/widgets/asset_amount_with_fiat.dart New widget to display asset amounts with fiat values in parentheses
lib/views/wallet/coin_details/withdraw_form/withdraw_form.dart Updated withdraw preview to use fiat-aware amount display and responsive layout

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@smk762
Copy link
Copy Markdown
Collaborator

smk762 commented Oct 28, 2025

Fiat value display confirmed, including long notes.

image image image image

@smk762 smk762 self-requested a review October 28, 2025 12:05
Copy link
Copy Markdown
Collaborator

@smk762 smk762 left a comment

Choose a reason for hiding this comment

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

Comparing to competing products, I dont think we should use the negative - symbol
image

@takenagain takenagain force-pushed the fix/withdraw-form-values branch from b017606 to 0f4bc96 Compare October 28, 2025 16:25
@takenagain
Copy link
Copy Markdown
Contributor Author

Comparing to competing products, I dont think we should use the negative - symbol

Done in 0f4bc96

/// Example output: "0.5 BTC ($15,234.50)"
///
/// The fiat value is only shown if pricing data is available from the SDK.
class AssetAmountWithFiat extends StatelessWidget {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: prefer a name that better aligns with Flutter's naming conventions, making it clear that it is a widget. I assumed AssetAmountWithFiat was a data class when I first read it.

e.g. AssetAmountWithFiatDisplay, AssetAmountWithFiatText, or otherwise if there's an existing widget with a backwards-compatible signature, refactor to add an additional parameter to specify if the fiat value should be shown (ignore if such a widget doesn't exist)

import 'package:web_dex/shared/utils/formatters.dart';
import 'package:web_dex/shared/utils/utils.dart';

/// A widget that displays an asset amount with its fiat value in parentheses.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: make it clear that the fiat value isn't passable and is automatically calculated from the SDK.

@smk762 smk762 self-requested a review October 29, 2025 03:26
Copy link
Copy Markdown
Collaborator

@smk762 smk762 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@ca333 ca333 merged commit c7e0a1e into dev Oct 29, 2025
7 of 13 checks passed
@ca333 ca333 mentioned this pull request Oct 29, 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.

5 participants