fix(decimal): render Reown/WalletConnect amounts with the network's decimal places - #898
fix(decimal): render Reown/WalletConnect amounts with the network's decimal places#898raul-oliveira wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 58 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
3ec25fa to
09eca73
Compare
df2d4c4 to
c5b3989
Compare
c5b3989 to
6c12f0d
Compare
Extend the amount-format decimal fix to the Reown/WalletConnect request screens (create token, get-utxos, transaction fees, send transaction) and the nano-contract action/arg displays, deferred from the base PR. These now render amounts at the network's decimal_places. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DfcfFFSBugJZYxtTjYLq4P
6c12f0d to
2026cae
Compare
|
|
||
| {/* ACQUIRE_AUTHORITY: Show only address (send the authority and create the output) */} | ||
| {action.type === NanoContractActionType.ACQUIRE_AUTHORITY && action.address && ( | ||
| {/* WITHDRAWAL: Show only address (address to send the amount and create the output) */} |
There was a problem hiding this comment.
suggestion(non-blocking): the layout restyle isn't covered by the acceptance criteria
This action item is restructured (addresses moved out of the icon row, indented by DEFAULT_ICON_SIZE + 16), and four files gain alignItems: 'flex-start' / textAlign: 'right' / maxWidth. Those render differently on a 2-decimal network too, so AC bullet 3 ("no behavior change on a 2-decimal network") no longer holds. Presumably it's making room for longer amounts — worth saying so in the description, so a reviewer knows to check the layout at the old precision as well.
| */ | ||
| const Amount = ({ amount, isNft }) => { | ||
| const amountToRender = renderValue(amount, isNft); | ||
| const decimalPlaces = useSelector((state) => state.serverInfo?.decimal_places); |
There was a problem hiding this comment.
question(non-blocking): should these amounts honour the compressed/expanded preference?
renderValue's fourth argument is the wallet-wide amount format added in PR 891; TxDetailsModal passes getDisplayAmountFormat(state), the Reown screens don't, so they stay EXPANDED. Deliberate — full precision on a screen you're signing from — or just out of this slice's scope?
Third slice of the amount-decimals fix, on top of #891 (merged to master). Extends the network
decimal_placesfix to the Reown/WalletConnect request screens. Independent of #894 — based directly on master.Acceptance Criteria
decimal_places(fromserverInfo) instead of the wallet-lib default of 2Screenshots
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-07-30.at.16.17.11.mov
Security Checklist