Skip to content

Commit

Permalink
fix: ts
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMuzyk committed Sep 9, 2024
1 parent 45484f1 commit 52674c3
Show file tree
Hide file tree
Showing 8 changed files with 226 additions and 219 deletions.
22 changes: 13 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ GEM
base64
nkf
rexml
activesupport (7.0.8.4)
activesupport (6.1.7.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
algoliasearch (1.27.5)
Expand Down Expand Up @@ -83,13 +84,14 @@ GEM
declarative (0.0.20)
digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20240107)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1)
emoji_regex (3.2.3)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
excon (0.111.0)
excon (0.109.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -185,19 +187,19 @@ GEM
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-storage_v1 (0.32.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.7.0)
google-cloud-core (1.6.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.4.0)
google-cloud-storage (1.47.0)
google-cloud-errors (1.3.1)
google-cloud-storage (1.37.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.31.0)
google-apis-storage_v1 (~> 0.1)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
Expand Down Expand Up @@ -248,7 +250,7 @@ GEM
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.5)
signet (0.19.0)
signet (0.18.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
Expand All @@ -270,6 +272,7 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unf (0.2.0)
unicode-display_width (2.5.0)
word_wrap (1.0.0)
xcodeproj (1.24.0)
Expand All @@ -283,6 +286,7 @@ GEM
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
zeitwerk (2.6.18)

PLATFORMS
arm64-darwin-21
Expand Down
404 changes: 202 additions & 202 deletions ios/NewExpensify.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3252,7 +3252,7 @@ SPEC CHECKSUMS:
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
Turf: aa2ede4298009639d10db36aba1a7ebaad072a5e
VisionCamera: c6c8aa4b028501fc87644550fbc35a537d4da3fb
Yoga: a1d7895431387402a674fd0d1c04ec85e87909b8
Yoga: 2a45d7e59592db061217551fd3bbe2dd993817ae

PODFILE CHECKSUM: e479ec84cb53e5fd463486d71dfee91708d3fd9a

Expand Down
2 changes: 1 addition & 1 deletion src/components/AddressSearch/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type AddressSearchProps = {
predefinedPlaces?: PredefinedPlace[] | null;

/** A map of inputID key names */
renamedInputKeys?: Address;
renamedInputKeys?: Record<string, string>;

/** Maximum number of characters allowed in search input */
maxInputLength?: number;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ReimbursementAccount/AddressFormFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type AddressFormProps = {
errors?: AddressErrors;

/** The map for inputID of the inputs */
inputKeys: Address;
inputKeys: Record<string, string>;

/** Saves a draft of the input value when used in a form */
shouldSaveDraft?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import * as ValidationUtils from '@libs/ValidationUtils';
import AddressFormFields from '@pages/ReimbursementAccount/AddressFormFields';
import WhyLink from '@pages/ReimbursementAccount/NonUSD/WhyLink';
import CONST from '@src/CONST';
import type {Country} from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';

type NameProps = SubStepProps & {isUserEnteringHisOwnData: boolean; ownerBeingModifiedID: string};
Expand All @@ -22,21 +23,21 @@ function Name({onNext, isEditing, isUserEnteringHisOwnData, ownerBeingModifiedID
const styles = useThemeStyles();
const [nonUSDReimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.NON_USD_REIMBURSEMENT_ACCOUNT_FORM_DRAFT);

const countryInputKey: `owner_${string}_${string}` = `${PREFIX}_${ownerBeingModifiedID}_${COUNTRY}`;
const inputKeys = {
street: `${PREFIX}_${ownerBeingModifiedID}_${STREET}`,
city: `${PREFIX}_${ownerBeingModifiedID}_${CITY}`,
state: `${PREFIX}_${ownerBeingModifiedID}_${STATE}`,
zipCode: `${PREFIX}_${ownerBeingModifiedID}_${ZIP_CODE}`,
country: `${PREFIX}_${ownerBeingModifiedID}_${COUNTRY}`,
country: countryInputKey,
} as const;
const countryInputKey: `owner_${string}_${string}` = `${PREFIX}_${ownerBeingModifiedID}_${COUNTRY}`;

const defaultValues = {
street: nonUSDReimbursementAccountDraft?.[inputKeys.street] ?? '',
city: nonUSDReimbursementAccountDraft?.[inputKeys.city] ?? '',
state: nonUSDReimbursementAccountDraft?.[inputKeys.state] ?? '',
zipCode: nonUSDReimbursementAccountDraft?.[inputKeys.zipCode] ?? '',
country: nonUSDReimbursementAccountDraft?.[inputKeys.country] ?? '',
country: (nonUSDReimbursementAccountDraft?.[inputKeys.country] ?? '') as Country | '',
};

const shouldDisplayStateSelector = defaultValues.country === CONST.COUNTRY.US || defaultValues.country === CONST.COUNTRY.CA;
Expand Down
2 changes: 1 addition & 1 deletion src/types/form/NonUSDReimbursementAccountForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type BankInfoStep = {
[INPUT_IDS.BANK_INFO_STEP.ROUTING_CODE]: string;
[INPUT_IDS.BANK_INFO_STEP.SWIFT_BIC_CODE]: string;
[INPUT_IDS.BANK_INFO_STEP.IBAN]: string;
[INPUT_IDS.BANK_INFO_STEP.ACCOUNT_HOLDER_COUNTRY]: string;
[INPUT_IDS.BANK_INFO_STEP.ACCOUNT_HOLDER_COUNTRY]: Country | '';
[INPUT_IDS.BANK_INFO_STEP.ACCOUNT_HOLDER_REGION]: string;
[INPUT_IDS.BANK_INFO_STEP.ACCOUNT_HOLDER_ADDRESS_LINE1]: string;
[INPUT_IDS.BANK_INFO_STEP.ACCOUNT_HOLDER_ADDRESS_LINE2]: string;
Expand Down
4 changes: 3 additions & 1 deletion src/types/onyx/PrivatePersonalDetails.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type {Country} from '@src/CONST';

/** User address data */
type Address = {
/** Street line 1 */
Expand All @@ -16,7 +18,7 @@ type Address = {
zip?: string;

/** Country code */
country?: string;
country?: Country | '';

/** Zip post code */
zipPostCode?: string;
Expand Down

0 comments on commit 52674c3

Please sign in to comment.