fix(withdraw): add USD fiat values alongside amounts#3274
Conversation
also decrease perimeter padding and increase vertical padding
|
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 (beta)
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. Comment |
|
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 |
161346d to
257e0af
Compare
There was a problem hiding this comment.
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
AssetAmountWithFiatwidget 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
left a comment
There was a problem hiding this comment.
Comparing to competing products, I dont think we should use the negative - symbol

b017606 to
0f4bc96
Compare
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 { |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Nit: make it clear that the fiat value isn't passable and is automatically calculated from the SDK.




Closes #2644 by adding the last remaining detail: fiat amount alongside fee and transaction amounts.
Mobile
Further mobile examples
Web/Desktop
Note
Adds a reusable AssetAmountWithFiat widget and updates withdraw preview to show USD fiat for amount and fee with a responsive layout.
AssetAmountWithFiat: new widget to display crypto amount with optional coin symbol and USD fiat (from SDK pricing), supporting auto-scroll and selectable text.WithdrawPreviewDetails: now usesAssetAmountWithFiatforamountandfeeto show fiat values.widthThreshold,minPadding,maxPadding).Written by Cursor Bugbot for commit fc2f907. This will update automatically on new commits. Configure here.