Skip to content

Commit 8777bac

Browse files
authored
Merge branch 'main' into refactor/encryptor-class
2 parents 5516e4a + 543d671 commit 8777bac

File tree

51 files changed

+1148
-2147
lines changed

Some content is hidden

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

51 files changed

+1148
-2147
lines changed

app/actions/experimental/index.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable import/prefer-default-export */
2-
import { PPOMInitialisationStatusType } from '@metamask/ppom-validator';
31
import type { Action } from 'redux';
42

53
export enum ActionType {
@@ -11,12 +9,3 @@ export interface SetSecurityAlertsEnabled
119
extends Action<ActionType.SET_SECURITY_ALERTS_ENABLED> {
1210
securityAlertsEnabled: boolean;
1311
}
14-
15-
export function UpdatePPOMInitializationStatus(
16-
ppomInitialisationStatus?: PPOMInitialisationStatusType,
17-
) {
18-
return {
19-
type: ActionType.SET_PPOM_INITIALIZATION_STATUS,
20-
ppomInitialisationStatus,
21-
};
22-
}

app/components/Nav/App/index.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ import EthSignFriction from '../../../components/Views/Settings/AdvancedSettings
8686
import WalletActions from '../../Views/WalletActions';
8787
import NetworkSelector from '../../../components/Views/NetworkSelector';
8888
import ReturnToAppModal from '../../Views/ReturnToAppModal';
89-
import BlockaidIndicator from '../../Views/Settings/SecuritySettings/BlockaidIndicator';
9089
import EditAccountName from '../../Views/EditAccountName/EditAccountName';
9190
import WC2Manager, {
9291
isWC2Enabled,
@@ -569,10 +568,6 @@ const App = ({ userLoggedIn }) => {
569568
name={Routes.SHEET.RETURN_TO_DAPP_MODAL}
570569
component={ReturnToAppModal}
571570
/>
572-
<Stack.Screen
573-
name={Routes.SHEET.BLOCKAID_INDICATOR}
574-
component={BlockaidIndicator}
575-
/>
576571
<Stack.Screen
577572
name={Routes.SHEET.AMBIGUOUS_ADDRESS}
578573
component={AmbiguousAddressSheet}

app/components/UI/Ramp/Views/BuildQuote/BuildQuote.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,6 @@ const BuildQuote = () => {
458458
const handleChangePaymentMethod = useCallback(
459459
(paymentMethodId) => {
460460
if (paymentMethodId) {
461-
setAmount('0');
462-
setAmountNumber(0);
463461
setSelectedPaymentMethodId(paymentMethodId);
464462
}
465463
hidePaymentMethodModal();
@@ -666,12 +664,9 @@ const BuildQuote = () => {
666664
);
667665
}
668666

669-
let displayAmount;
670-
if (isBuy) {
671-
displayAmount = amountFocused ? amount : formatAmount(amountNumber);
672-
} else {
673-
displayAmount = `${amount} ${selectedAsset?.symbol}`;
674-
}
667+
const displayAmount = isBuy
668+
? formatAmount(amountNumber)
669+
: `${amount} ${selectedAsset?.symbol}`;
675670

676671
let quickAmounts: QuickAmount[] = [];
677672

app/components/Views/Settings/ExperimentalSettings/index.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ import Text, {
99
TextVariant,
1010
TextColor,
1111
} from '../../../../component-library/components/Texts/Text';
12-
import { UpdatePPOMInitializationStatus } from '../../../../actions/experimental';
1312
import { getNavigationOptionsTitle } from '../../../UI/Navbar';
14-
import { useDispatch } from 'react-redux';
1513
import { Props } from './ExperimentalSettings.types';
1614
import createStyles from './ExperimentalSettings.styles';
1715
import Button, {
@@ -29,8 +27,6 @@ const storage = new MMKV(); // id: mmkv.default
2927
* Main view for app Experimental Settings
3028
*/
3129
const ExperimentalSettings = ({ navigation, route }: Props) => {
32-
const dispatch = useDispatch();
33-
3430
const [sesEnabled, setSesEnabled] = useState(
3531
storage.getBoolean('is-ses-enabled'),
3632
);
@@ -46,10 +42,6 @@ const ExperimentalSettings = ({ navigation, route }: Props) => {
4642
const { colors } = theme;
4743
const styles = createStyles(colors);
4844

49-
useEffect(() => {
50-
dispatch(UpdatePPOMInitializationStatus());
51-
}, [dispatch]);
52-
5345
useEffect(
5446
() => {
5547
navigation.setOptions(

app/components/Views/Settings/GeneralSettings/index.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
setUseBlockieIcon,
2626
setHideZeroBalanceTokens,
2727
} from '../../../../actions/settings';
28+
import PickComponent from '../../PickComponent';
2829
import { toDataUrl } from '../../../../util/blockies.js';
2930
import Jazzicon from 'react-native-jazzicon';
3031
import { ThemeContext, mockTheme } from '../../../../util/theme';
@@ -149,6 +150,10 @@ class Settings extends PureComponent {
149150
* Active search engine
150151
*/
151152
searchEngine: PropTypes.string,
153+
/**
154+
* Active primary currency
155+
*/
156+
primaryCurrency: PropTypes.string,
152157
/**
153158
* Show a BlockieIcon instead of JazzIcon
154159
*/
@@ -279,6 +284,7 @@ class Settings extends PureComponent {
279284
render() {
280285
const {
281286
currentCurrency,
287+
primaryCurrency,
282288
useBlockieIcon,
283289
setUseBlockieIcon,
284290
selectedAddress,
@@ -313,6 +319,34 @@ class Settings extends PureComponent {
313319
</View>
314320
</View>
315321
</View>
322+
<View style={styles.setting}>
323+
<Text variant={TextVariant.BodyLGMedium}>
324+
{strings('app_settings.primary_currency_title')}
325+
</Text>
326+
<Text
327+
variant={TextVariant.BodyMD}
328+
color={TextColor.Alternative}
329+
style={styles.desc}
330+
>
331+
{strings('app_settings.primary_currency_desc')}
332+
</Text>
333+
{this.primaryCurrencyOptions && (
334+
<View style={styles.accessory}>
335+
<PickComponent
336+
pick={this.selectPrimaryCurrency}
337+
textFirst={strings(
338+
'app_settings.primary_currency_text_first',
339+
)}
340+
valueFirst={'ETH'}
341+
textSecond={strings(
342+
'app_settings.primary_currency_text_second',
343+
)}
344+
valueSecond={'Fiat'}
345+
selectedValue={primaryCurrency}
346+
/>
347+
</View>
348+
)}
349+
</View>
316350
<View style={styles.setting}>
317351
<Text variant={TextVariant.BodyLGMedium}>
318352
{strings('app_settings.current_language')}

app/components/Views/Settings/SecuritySettings/BlockaidIndicator/BlockaidIndicator.styles.ts

Lines changed: 0 additions & 44 deletions
This file was deleted.

app/components/Views/Settings/SecuritySettings/BlockaidIndicator/BlockaidIndicator.test.tsx

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)