From beaf425068bd9de9b8f98d775c9aeb2fef925814 Mon Sep 17 00:00:00 2001 From: Anthony Date: Tue, 29 Mar 2022 17:11:37 +0200 Subject: [PATCH] fix some flow errors and other pointers --- ui/component/walletTipAmountSelector/view.jsx | 2 +- ui/page/settingsStripeCard/view.jsx | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/component/walletTipAmountSelector/view.jsx b/ui/component/walletTipAmountSelector/view.jsx index 09c6bf38a..76d0a69d6 100644 --- a/ui/component/walletTipAmountSelector/view.jsx +++ b/ui/component/walletTipAmountSelector/view.jsx @@ -34,7 +34,7 @@ type Props = { setConvertedAmount?: (number) => void, setDisableSubmitButton: (boolean) => void, setTipError: (any) => void, - preferredCurrency?: boolean, + preferredCurrency: string, }; function WalletTipAmountSelector(props: Props) { diff --git a/ui/page/settingsStripeCard/view.jsx b/ui/page/settingsStripeCard/view.jsx index bd187877f..50ff7af09 100644 --- a/ui/page/settingsStripeCard/view.jsx +++ b/ui/page/settingsStripeCard/view.jsx @@ -27,9 +27,12 @@ type Props = { email: ?string, scriptFailedToLoad: boolean, doOpenModal: (string, {}) => void, + doToast: ({}) => void, openModal: (string, {}) => void, setAsConfirmingCard: () => void, locale: ?any, + preferredCurrency: string, + setPreferredCurrency: (string) => void, }; // type State = { @@ -368,7 +371,7 @@ class SettingsStripeCard extends React.Component { render() { let that = this; - const returnToValue = new URLSearchParams(this.props.location.search).get('returnTo'); + const returnToValue = new URLSearchParams(location.search).get('returnTo'); let shouldShowBackToMembershipButton = returnToValue === 'premium'; function setAsConfirmingCard() { @@ -482,7 +485,7 @@ class SettingsStripeCard extends React.Component {
-

Currency To Use:

+

{__('Currency To Use')}:

{ type="select" onChange={onCurrencyChange} value={preferredCurrency} - // disabled={automaticDarkModeEnabled} > {['USD', 'EUR'].map((currency) => (