Skip to content

Commit

Permalink
fix: regression infinite loading in request money page
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Sep 28, 2023
1 parent 603dc58 commit 4fa0ba0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
18 changes: 0 additions & 18 deletions src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,29 +75,11 @@ Onyx.connect({
},
});

let didInitCurrency = false;
Onyx.connect({
key: ONYXKEYS.IOU,
callback: (val) => {
didInitCurrency = lodashGet(val, 'didInitCurrency');
},
});

let shouldResetIOUAfterLogin = true;
let currentUserPersonalDetails = {};
Onyx.connect({
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
callback: (val) => {
currentUserPersonalDetails = lodashGet(val, userAccountID, {});
if (!val || !shouldResetIOUAfterLogin || didInitCurrency) {
return;
}
// eslint-disable-next-line no-use-before-define
resetMoneyRequestInfo();
shouldResetIOUAfterLogin = false;
Onyx.merge(ONYXKEYS.IOU, {
didInitCurrency: true,
});
},
});

Expand Down
4 changes: 0 additions & 4 deletions src/pages/iou/steps/NewRequestAmountPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ function NewRequestAmountPage({route, iou, report, selectedTab}) {
/>
);

if (!lodashGet(iou, 'didInitCurrency', false)) {
return <FullScreenLoadingIndicator />;
}

// ScreenWrapper is only needed in edit mode because we have a dedicated route for the edit amount page (MoneyRequestEditAmountPage).
// The rest of the cases this component is rendered through <MoneyRequestSelectorPage /> which has it's own ScreenWrapper
if (!isEditing) {
Expand Down

0 comments on commit 4fa0ba0

Please sign in to comment.