Skip to content

Commit c86b079

Browse files
committed
Merge branch 'main' into fix/57769
2 parents df42753 + 96edca9 commit c86b079

File tree

57 files changed

+2716
-563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2716
-563
lines changed

.storybook/webpack.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const webpackConfig = ({config}: {config: Configuration}) => {
5858
'react-native$': 'react-native-web',
5959
'@react-native-community/netinfo': path.resolve(__dirname, '../__mocks__/@react-native-community/netinfo.ts'),
6060
'@react-navigation/native': path.resolve(__dirname, '../__mocks__/@react-navigation/native'),
61+
'@libs/TransactionPreviewUtils': path.resolve(__dirname, '../src/libs/__mocks__/TransactionPreviewUtils.ts'),
6162
...custom.resolve.alias,
6263
};
6364

Mobile-Expensify

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ android {
114114
minSdkVersion rootProject.ext.minSdkVersion
115115
targetSdkVersion rootProject.ext.targetSdkVersion
116116
multiDexEnabled rootProject.ext.multiDexEnabled
117-
versionCode 1009011305
118-
versionName "9.1.13-5"
117+
versionCode 1009011400
118+
versionName "9.1.14-0"
119119
// Supported language variants must be declared here to avoid from being removed during the compilation.
120120
// This also helps us to not include unnecessary language variants in the APK.
121121
resConfigs "en", "es"

assets/images/fake-receipt.png

83.9 KB
Loading
Lines changed: 80 additions & 0 deletions
Loading

ios/NewExpensify/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<key>CFBundlePackageType</key>
2424
<string>APPL</string>
2525
<key>CFBundleShortVersionString</key>
26-
<string>9.1.13</string>
26+
<string>9.1.14</string>
2727
<key>CFBundleSignature</key>
2828
<string>????</string>
2929
<key>CFBundleURLTypes</key>
@@ -44,7 +44,7 @@
4444
</dict>
4545
</array>
4646
<key>CFBundleVersion</key>
47-
<string>9.1.13.5</string>
47+
<string>9.1.14.0</string>
4848
<key>FullStory</key>
4949
<dict>
5050
<key>OrgId</key>

ios/NewExpensifyTests/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>9.1.13</string>
18+
<string>9.1.14</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>9.1.13.5</string>
22+
<string>9.1.14.0</string>
2323
</dict>
2424
</plist>

ios/NotificationServiceExtension/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<key>CFBundleName</key>
1212
<string>$(PRODUCT_NAME)</string>
1313
<key>CFBundleShortVersionString</key>
14-
<string>9.1.13</string>
14+
<string>9.1.14</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.1.13.5</string>
16+
<string>9.1.14.0</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionPointIdentifier</key>

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "new.expensify",
3-
"version": "9.1.13-5",
3+
"version": "9.1.14-0",
44
"author": "Expensify, Inc.",
55
"homepage": "https://new.expensify.com",
66
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",

src/CONST.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3494,6 +3494,13 @@ const CONST = {
34943494
WORKSPACE_NAME_CHARACTER_LIMIT: 80,
34953495
STATE_CHARACTER_LIMIT: 32,
34963496

3497+
// Test receipt data
3498+
TEST_RECEIPT: {
3499+
AMOUNT: 1800,
3500+
CURRENCY: 'USD',
3501+
FILENAME: 'test_receipt',
3502+
},
3503+
34973504
AVATAR_CROP_MODAL: {
34983505
// The next two constants control what is min and max value of the image crop scale.
34993506
// Values define in how many times the image can be bigger than its container.

src/Expensify.tsx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import DeeplinkWrapper from './components/DeeplinkWrapper';
99
import EmojiPicker from './components/EmojiPicker/EmojiPicker';
1010
import FocusModeNotification from './components/FocusModeNotification';
1111
import GrowlNotification from './components/GrowlNotification';
12-
import RequireTwoFactorAuthenticationModal from './components/RequireTwoFactorAuthenticationModal';
1312
import AppleAuthWrapper from './components/SignInButtons/AppleAuthWrapper';
1413
import SplashScreenHider from './components/SplashScreenHider';
1514
import TestToolsModal from './components/TestToolsModal';
@@ -43,7 +42,6 @@ import ONYXKEYS from './ONYXKEYS';
4342
import PopoverReportActionContextMenu from './pages/home/report/ContextMenu/PopoverReportActionContextMenu';
4443
import * as ReportActionContextMenu from './pages/home/report/ContextMenu/ReportActionContextMenu';
4544
import type {Route} from './ROUTES';
46-
import ROUTES from './ROUTES';
4745
import SplashScreenStateContext from './SplashScreenStateContext';
4846
import type {ScreenShareRequest} from './types/onyx';
4947

@@ -91,7 +89,6 @@ function Expensify() {
9189
const [session] = useOnyx(ONYXKEYS.SESSION);
9290
const [lastRoute] = useOnyx(ONYXKEYS.LAST_ROUTE);
9391
const [userMetadata] = useOnyx(ONYXKEYS.USER_METADATA);
94-
const [shouldShowRequire2FAModal, setShouldShowRequire2FAModal] = useState(false);
9592
const [isCheckingPublicRoom] = useOnyx(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, {initWithStoredValues: false});
9693
const [updateAvailable] = useOnyx(ONYXKEYS.UPDATE_AVAILABLE, {initWithStoredValues: false});
9794
const [updateRequired] = useOnyx(ONYXKEYS.UPDATE_REQUIRED, {initWithStoredValues: false});
@@ -102,13 +99,6 @@ function Expensify() {
10299

103100
useDebugShortcut();
104101

105-
useEffect(() => {
106-
if (!account?.needsTwoFactorAuthSetup || account.requiresTwoFactorAuth) {
107-
return;
108-
}
109-
setShouldShowRequire2FAModal(true);
110-
}, [account?.needsTwoFactorAuthSetup, account?.requiresTwoFactorAuth]);
111-
112102
const [initialUrl, setInitialUrl] = useState<string | null>(null);
113103

114104
useEffect(() => {
@@ -287,16 +277,6 @@ function Expensify() {
287277
/>
288278
) : null}
289279
{focusModeNotification ? <FocusModeNotification /> : null}
290-
{shouldShowRequire2FAModal ? (
291-
<RequireTwoFactorAuthenticationModal
292-
onSubmit={() => {
293-
setShouldShowRequire2FAModal(false);
294-
Navigation.navigate(ROUTES.SETTINGS_2FA_ROOT.getRoute(ROUTES.HOME));
295-
}}
296-
isVisible
297-
description={translate('twoFactorAuth.twoFactorAuthIsRequiredForAdminsDescription')}
298-
/>
299-
) : null}
300280
</>
301281
)}
302282

@@ -307,7 +287,6 @@ function Expensify() {
307287
authenticated={isAuthenticated}
308288
lastVisitedPath={lastVisitedPath as Route}
309289
initialUrl={initialUrl}
310-
shouldShowRequire2FAModal={shouldShowRequire2FAModal}
311290
/>
312291
)}
313292
{shouldHideSplash && <SplashScreenHider onHide={onSplashHide} />}

src/ROUTES.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ const ROUTES = {
115115
ENABLE_PAYMENTS: 'enable-payments',
116116
WALLET_STATEMENT_WITH_DATE: 'statements/:yearMonth',
117117
SIGN_IN_MODAL: 'sign-in-modal',
118+
REQUIRE_TWO_FACTOR_AUTH: '2fa-required',
118119

119120
BANK_ACCOUNT: 'bank-account',
120121
BANK_ACCOUNT_NEW: 'bank-account/new',

src/SCREENS.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ const SCREENS = {
212212
DESKTOP_SIGN_IN_REDIRECT: 'DesktopSignInRedirect',
213213
SAML_SIGN_IN: 'SAMLSignIn',
214214
WORKSPACE_JOIN_USER: 'WorkspaceJoinUser',
215+
REQUIRE_TWO_FACTOR_AUTH: 'RequireTwoFactorAuth',
215216

216217
MONEY_REQUEST: {
217218
CREATE: 'Money_Request_Create',

src/components/Icon/Illustrations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ import CreditCardEyes from '@assets/images/simple-illustrations/simple-illustrat
9393
import CreditCardsNewGreen from '@assets/images/simple-illustrations/simple-illustration__creditcards--green.svg';
9494
import EmailAddress from '@assets/images/simple-illustrations/simple-illustration__email-address.svg';
9595
import EmptyState from '@assets/images/simple-illustrations/simple-illustration__empty-state.svg';
96+
import Encryption from '@assets/images/simple-illustrations/simple-illustration__encryption.svg';
9697
import EnvelopeReceipt from '@assets/images/simple-illustrations/simple-illustration__envelopereceipt.svg';
9798
import Filters from '@assets/images/simple-illustrations/simple-illustration__filters.svg';
9899
import Flash from '@assets/images/simple-illustrations/simple-illustration__flash.svg';
@@ -155,6 +156,7 @@ import TurtleInShell from '@assets/images/turtle-in-shell.svg';
155156

156157
export {
157158
Abracadabra,
159+
Encryption,
158160
BankArrowPink,
159161
BankMouseGreen,
160162
BankUserGreen,

src/components/MoneyRequestConfirmationList.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ import {calculateAmount, insertTagIntoTransactionTagsString, isMovingTransaction
3131
import Log from '@libs/Log';
3232
import {validateAmount} from '@libs/MoneyRequestUtils';
3333
import Navigation from '@libs/Navigation/Navigation';
34-
import {getIOUConfirmationOptionsFromPayeePersonalDetail, hasEnabledOptions, isSelectedManagerMcTest} from '@libs/OptionsListUtils';
34+
import {getIOUConfirmationOptionsFromPayeePersonalDetail, hasEnabledOptions} from '@libs/OptionsListUtils';
3535
import Permissions from '@libs/Permissions';
3636
import {getDistanceRateCustomUnitRate, getTagLists, isTaxTrackingEnabled} from '@libs/PolicyUtils';
37+
import {isSelectedManagerMcTest} from '@libs/ReportUtils';
3738
import type {OptionData} from '@libs/ReportUtils';
3839
import playSound, {SOUNDS} from '@libs/Sound';
3940
import {

src/components/ProductTrainingContext/index.tsx

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ type ProductTrainingContextType = {
2525
unregisterTooltip: (tooltipName: ProductTrainingTooltipName) => void;
2626
};
2727

28+
type ProductTrainingContextConfig = {
29+
/**
30+
* Callback to be called when the tooltip is dismissed
31+
*/
32+
onDismiss?: () => void;
33+
34+
/**
35+
* Callback to be called when the tooltip is confirmed
36+
*/
37+
onConfirm?: () => void;
38+
};
39+
2840
const ProductTrainingContext = createContext<ProductTrainingContextType>({
2941
shouldRenderTooltip: () => false,
3042
registerTooltip: () => {},
@@ -161,7 +173,7 @@ function ProductTrainingContextProvider({children}: ChildrenProps) {
161173
return <ProductTrainingContext.Provider value={contextValue}>{children}</ProductTrainingContext.Provider>;
162174
}
163175

164-
const useProductTrainingContext = (tooltipName: ProductTrainingTooltipName, shouldShow = true) => {
176+
const useProductTrainingContext = (tooltipName: ProductTrainingTooltipName, shouldShow = true, config: ProductTrainingContextConfig = {}) => {
165177
const context = useContext(ProductTrainingContext);
166178
const styles = useThemeStyles();
167179
const theme = useTheme();
@@ -198,7 +210,17 @@ const useProductTrainingContext = (tooltipName: ProductTrainingTooltipName, shou
198210
fsClass={CONST.FULL_STORY.UNMASK}
199211
testID={CONST.FULL_STORY.UNMASK}
200212
>
201-
<View style={[styles.alignItemsCenter, styles.flexRow, styles.justifyContentCenter, styles.flexWrap, styles.textAlignCenter, styles.gap3, styles.p2]}>
213+
<View
214+
style={[
215+
styles.alignItemsCenter,
216+
styles.flexRow,
217+
tooltip?.shouldRenderActionButtons ? styles.justifyContentStart : styles.justifyContentCenter,
218+
styles.flexWrap,
219+
styles.textAlignCenter,
220+
styles.gap3,
221+
styles.p2,
222+
]}
223+
>
202224
<Icon
203225
src={Expensicons.Lightbulb}
204226
fill={theme.tooltipHighlightText}
@@ -219,21 +241,25 @@ const useProductTrainingContext = (tooltipName: ProductTrainingTooltipName, shou
219241
</Text>
220242
</View>
221243
{!!tooltip?.shouldRenderActionButtons && (
222-
<View style={[styles.alignItemsCenter, styles.justifyContentBetween, styles.flexRow, styles.ph1, styles.pv2]}>
244+
<View style={[styles.alignItemsCenter, styles.justifyContentBetween, styles.flexRow, styles.ph2, styles.pv2, styles.gap2]}>
223245
<Button
224246
success
225247
text={translate('productTrainingTooltip.scanTestTooltip.tryItOut')}
226-
style={[styles.flex1, styles.ph1]}
248+
style={[styles.flex1]}
249+
onPress={config.onConfirm}
227250
/>
228251
<Button
229252
text={translate('productTrainingTooltip.scanTestTooltip.noThanks')}
230-
style={[styles.flex1, styles.ph1]}
253+
style={[styles.flex1]}
254+
onPress={config.onDismiss}
231255
/>
232256
</View>
233257
)}
234258
</View>
235259
);
236260
}, [
261+
config.onConfirm,
262+
config.onDismiss,
237263
styles.alignItemsCenter,
238264
styles.flex1,
239265
styles.flexRow,
@@ -243,12 +269,14 @@ const useProductTrainingContext = (tooltipName: ProductTrainingTooltipName, shou
243269
styles.justifyContentCenter,
244270
styles.mw100,
245271
styles.p2,
246-
styles.ph1,
247272
styles.productTrainingTooltipText,
248273
styles.pv2,
249274
styles.textAlignCenter,
250275
styles.textBold,
251276
styles.textWrap,
277+
styles.gap2,
278+
styles.justifyContentStart,
279+
styles.ph2,
252280
theme.tooltipHighlightText,
253281
tooltipName,
254282
translate,

0 commit comments

Comments
 (0)