-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[No QA] 1-6 Card Flow UI #44741
[No QA] 1-6 Card Flow UI #44741
Changes from 19 commits
4216e95
93de31b
c27e5ef
c3ea4e3
a38ad57
a6ef082
966e1e9
0f6898c
899a78a
169a0d3
98dc915
ece0ee0
7d74daa
f97a457
992d2fb
79f6d02
7e621e1
6623cc7
de38131
1b5302e
804ed05
0946e49
bbbb91e
e0094ab
6f12b11
f60d52e
aa72999
b303307
8e95e15
768641f
b58b364
8d81d1d
1023fd6
255d899
947e3c0
bb7b3dc
4e3d445
5fe7e81
8624227
2c3a8c1
c514207
b689e39
12b2fa7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,11 +96,11 @@ function convertToFrontendAmountAsInteger(amountAsInt: number): number { | |
* | ||
* @note we do not support any currencies with more than two decimal places. | ||
*/ | ||
function convertToFrontendAmountAsString(amountAsInt: number | null | undefined): string { | ||
function convertToFrontendAmountAsString(amountAsInt: number | null | undefined, withDecimals = true): string { | ||
if (amountAsInt === null || amountAsInt === undefined) { | ||
return ''; | ||
} | ||
return convertToFrontendAmountAsInteger(amountAsInt).toFixed(2); | ||
return convertToFrontendAmountAsInteger(amountAsInt).toFixed(withDecimals ? 2 : 0); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are implementing a PR to make this change. In that PR, the decimal relies on the currency and I think it will make more sense There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so we will be able to get an amount without decimals then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure what you mean. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this PR, we will display the decimal relies on the current currency. Then do we need to apply your change here any more? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, because we don't want to display any decimals here - it's for the limit step. I guess that after the changes from this PR you mentioned we will have 2 decimals for USD and for other currencies using 2 decimals. |
||
} | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB: ISSUE_NEW_EXPENSIFY_CARD_FORM_DRAFT isn't used in anywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's how it's implemented for the other forms - TS would complain if I removed it 😅