From dd9b3ebf1c9e611b8fe986a48a6dfb3f71102b19 Mon Sep 17 00:00:00 2001 From: Shahe Shahinyan Date: Sun, 21 Apr 2024 00:52:59 +0400 Subject: [PATCH 1/2] Fix editing IOU currency --- ios/tmp.xcconfig | 10 ++++++++++ src/pages/iou/request/step/IOURequestStepAmount.tsx | 10 +++++----- 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 ios/tmp.xcconfig diff --git a/ios/tmp.xcconfig b/ios/tmp.xcconfig new file mode 100644 index 000000000000..4b1346bf72e2 --- /dev/null +++ b/ios/tmp.xcconfig @@ -0,0 +1,10 @@ +NEW_EXPENSIFY_URL=https:/$()/new.expensify.com/ +SECURE_EXPENSIFY_URL=https:/$()/secure.expensify.com/ +EXPENSIFY_URL=https:/$()/www.expensify.com/ +EXPENSIFY_PARTNER_NAME=chat-expensify-com +EXPENSIFY_PARTNER_PASSWORD=e21965746fd75f82bb66 +PUSHER_APP_KEY=268df511a204fbb60884 +USE_WEB_PROXY=false +ENVIRONMENT=production +SEND_CRASH_REPORTS=true +GOOGLE_GEOLOCATION_API_KEY=AIzaSyBFKujMpzExz0_z2pAGfPUwkmlaUc-uw1Q diff --git a/src/pages/iou/request/step/IOURequestStepAmount.tsx b/src/pages/iou/request/step/IOURequestStepAmount.tsx index f4abc90bd315..06f6a7c1843a 100644 --- a/src/pages/iou/request/step/IOURequestStepAmount.tsx +++ b/src/pages/iou/request/step/IOURequestStepAmount.tsx @@ -40,7 +40,7 @@ type IOURequestStepAmountOnyxProps = { skipConfirmation: OnyxEntry; /** The backup transaction object being modified in Onyx */ - backupTransaction: OnyxEntry; + draftTransaction: OnyxEntry; /** Personal details of all users */ personalDetails: OnyxEntry; @@ -66,7 +66,7 @@ function IOURequestStepAmount({ personalDetails, currentUserPersonalDetails, splitDraftTransaction, - backupTransaction, + draftTransaction, skipConfirmation, }: IOURequestStepAmountProps) { const {translate} = useLocalize(); @@ -79,7 +79,7 @@ function IOURequestStepAmount({ const isSplitBill = iouType === CONST.IOU.TYPE.SPLIT; const isEditingSplitBill = isEditing && isSplitBill; const {amount: transactionAmount} = ReportUtils.getTransactionDetails(isEditingSplitBill && !isEmptyObject(splitDraftTransaction) ? splitDraftTransaction : transaction) ?? {amount: 0}; - const {currency: originalCurrency} = ReportUtils.getTransactionDetails(isEditing ? backupTransaction : transaction) ?? {currency: CONST.CURRENCY.USD}; + const {currency: originalCurrency} = ReportUtils.getTransactionDetails(isEditing ? draftTransaction : transaction) ?? {currency: CONST.CURRENCY.USD}; const currency = CurrencyUtils.isValidCurrencyCode(selectedCurrency) ? selectedCurrency : originalCurrency; // For quick button actions, we'll skip the confirmation page unless the report is archived or this is a workspace request, as @@ -266,10 +266,10 @@ const IOURequestStepAmountWithOnyx = withOnyx { const transactionID = route.params.transactionID ?? 0; - return `${ONYXKEYS.COLLECTION.TRANSACTION_BACKUP}${transactionID}`; + return `${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`; }, }, skipConfirmation: { From 1bc775222f8ff01b8f3f9e480af49b58e13f295a Mon Sep 17 00:00:00 2001 From: Shahe Shahinyan Date: Sun, 21 Apr 2024 01:11:14 +0400 Subject: [PATCH 2/2] Remove extra file --- ios/tmp.xcconfig | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 ios/tmp.xcconfig diff --git a/ios/tmp.xcconfig b/ios/tmp.xcconfig deleted file mode 100644 index 4b1346bf72e2..000000000000 --- a/ios/tmp.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -NEW_EXPENSIFY_URL=https:/$()/new.expensify.com/ -SECURE_EXPENSIFY_URL=https:/$()/secure.expensify.com/ -EXPENSIFY_URL=https:/$()/www.expensify.com/ -EXPENSIFY_PARTNER_NAME=chat-expensify-com -EXPENSIFY_PARTNER_PASSWORD=e21965746fd75f82bb66 -PUSHER_APP_KEY=268df511a204fbb60884 -USE_WEB_PROXY=false -ENVIRONMENT=production -SEND_CRASH_REPORTS=true -GOOGLE_GEOLOCATION_API_KEY=AIzaSyBFKujMpzExz0_z2pAGfPUwkmlaUc-uw1Q