Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added USD asset price next to currency rows (send) in tx sim #5374

Merged
merged 8 commits into from Feb 5, 2024

Conversation

dereknelson
Copy link
Contributor

Fixes APP-1122

What changed (plus any additional context for devs)

now we have a USD value for what you're swapping!

Screen recordings / screenshots

image

What to test

that send amounts show up

Copy link

linear bot commented Feb 1, 2024

Copy link
Contributor

@skylarbarrera skylarbarrera left a comment

Choose a reason for hiding this comment

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

smol things

src/screens/SignTransactionSheet.tsx Outdated Show resolved Hide resolved
src/screens/SignTransactionSheet.tsx Outdated Show resolved Hide resolved
src/screens/SignTransactionSheet.tsx Outdated Show resolved Hide resolved
@christianbaroni
Copy link
Member

last q, are the $ amounts formatted properly?

e.g. 2500.00 should be formatted as $2,500

@dereknelson
Copy link
Contributor Author

@christianbaroni it is now, good catch

Comment on lines +2114 to +2117
const showUSD = (eventType === 'send' || eventType === 'receive') && price;
const formattedPrice = `$${price?.toLocaleString?.('en-US', {
maximumFractionDigits: 2,
})}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocker on this PR at all, but wonder if it's worth opening up a backlog to explore instances where we display currency and match it to the user's desired currency that they chose in settings.

Seems like in a lot of places we assume USD

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah i think if we're not doing USD we'd keep currency pref on backend and strip all locale conversions on client

Copy link
Contributor

@skylarbarrera skylarbarrera left a comment

Choose a reason for hiding this comment

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

lets get it

@dereknelson dereknelson merged commit b50d6ce into develop Feb 5, 2024
6 checks passed
@dereknelson dereknelson deleted the @derek/tx-sim-2 branch February 5, 2024 17:58
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.

None yet

4 participants