Skip to content

Commit

Permalink
fix: pending is displayed when deleting the distance rate
Browse files Browse the repository at this point in the history
  • Loading branch information
mkzie2 committed Feb 4, 2025
1 parent 92eb817 commit 85a4fd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/DistanceRequestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ function getRate({
}
const policyCurrency = policy?.outputCurrency ?? getPersonalPolicy()?.outputCurrency ?? CONST.CURRENCY.USD;
const defaultMileageRate = getDefaultMileageRate(policy);
const customUnitRateID = getRateID(transaction);
const customMileageRate = customUnitRateID ? mileageRates?.[customUnitRateID] : defaultMileageRate;
const customUnitRateID = getRateID(transaction) ?? String(CONST.DEFAULT_NUMBER_ID);
const customMileageRate = mileageRates?.[customUnitRateID] ?? defaultMileageRate;
const mileageRate = isCustomUnitRateIDForP2P(transaction) ? getRateForP2P(policyCurrency, transaction) : customMileageRate;
const unit = getDistanceUnit(useTransactionDistanceUnit ? transaction : undefined, mileageRate);
return {
Expand Down

0 comments on commit 85a4fd4

Please sign in to comment.