Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
abzokhattab committed Feb 6, 2024
1 parent 72d282f commit 8e80ffb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/iou/steps/MoneyRequestAmountForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ function MoneyRequestAmountForm({amount, taxAmount, currency, isEditing, forward
const isTaxAmountForm = Navigation.getActiveRoute().includes('taxAmount');

const decimals = CurrencyUtils.getCurrencyDecimals(currency);
const selectedAmountAsString = amount ? CurrencyUtils.convertToFrontendAmountAsString(amount) : '';

const selectedAmountAsString = CurrencyUtils.convertToFrontendAmountAsString(amount);
const [currentAmount, setCurrentAmount] = useState(selectedAmountAsString);
const [formError, setFormError] = useState('');
const [shouldUpdateSelection, setShouldUpdateSelection] = useState(true);
Expand Down Expand Up @@ -119,7 +118,7 @@ function MoneyRequestAmountForm({amount, taxAmount, currency, isEditing, forward
};

const initializeAmount = useCallback((newAmount) => {
const frontendAmount = newAmount ? CurrencyUtils.convertToFrontendAmountAsString(newAmount) : '';
const frontendAmount = CurrencyUtils.convertToFrontendAmountAsString(newAmount);
setCurrentAmount(frontendAmount);
setSelection({
start: frontendAmount.length,
Expand Down

0 comments on commit 8e80ffb

Please sign in to comment.