Skip to content

Commit

Permalink
format amount before navigating to next page
Browse files Browse the repository at this point in the history
  • Loading branch information
kushu7 authored Jul 12, 2023
1 parent 105ba31 commit 2332843
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pages/iou/steps/MoneyRequestAmountPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,13 @@ function MoneyRequestAmountPage(props) {
IOU.setMoneyRequestAmount(amountInSmallestCurrencyUnits);
IOU.setMoneyRequestCurrency(selectedCurrencyCode);

const amountAsStringForState = CurrencyUtils.convertToWholeUnit(selectedCurrencyCode, amountInSmallestCurrencyUnits).toString();
setAmount(amountAsStringForState);
setSelection({
start: amountAsStringForState.length,
end: amountAsStringForState.length,
});

if (isEditing.current) {
Navigation.goBack(ROUTES.getMoneyRequestConfirmationRoute(iouType.current, reportID.current));
return;
Expand Down

0 comments on commit 2332843

Please sign in to comment.