Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .js.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ export MM_STABLECOIN_LENDING_UI_ENABLED_REDESIGNED="true"
## Pooled-Staking
export MM_POOLED_STAKING_ENABLED="true"
export MM_POOLED_STAKING_SERVICE_INTERRUPTION_BANNER_ENABLED="true"
# mUSD
export MM_MUSD_CONVERSION_FLOW_ENABLED="false"
# Allowlist of convertible tokens by chain
# IMPORTANT: Must use SINGLE QUOTES to preserve JSON format
# Example: MM_MUSD_CONVERTIBLE_TOKENS_ALLOWLIST='{"0x1":["USDC","USDT"],"0xa4b1":["USDC","DAI"]}'
export MM_MUSD_CONVERTIBLE_TOKENS_ALLOWLIST=''

# Activates remote feature flag override mode.
# Remote feature flag values won't be updated,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const ICON_BY_TAB_BAR_ICON_KEY: IconByTabBarIconKey = {
[TabBarIconKey.Activity]: IconName.Activity,
[TabBarIconKey.Setting]: IconName.Setting,
[TabBarIconKey.Rewards]: IconName.MetamaskFoxOutline,
[TabBarIconKey.Trending]: IconName.TrendUp,
[TabBarIconKey.Trending]: IconName.Search,
};

export const LABEL_BY_TAB_BAR_ICON_KEY = {
Expand Down
14 changes: 13 additions & 1 deletion app/components/Nav/Main/MainNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,19 @@ const MainNavigator = () => {
name={Routes.PERPS.ROOT}
component={PerpsScreenStack}
options={{
animationEnabled: false,
animationEnabled: true,
cardStyleInterpolator: ({ current, layouts }) => ({
cardStyle: {
transform: [
{
translateX: current.progress.interpolate({
inputRange: [0, 1],
outputRange: [layouts.screen.width, 0],
}),
},
],
},
}),
}}
/>
<Stack.Screen
Expand Down
2 changes: 2 additions & 0 deletions app/components/Nav/Main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import ProtectYourWalletModal from '../../UI/ProtectYourWalletModal';
import MainNavigator from './MainNavigator';
import { query } from '@metamask/controller-utils';
import SwapsLiveness from '../../UI/Swaps/SwapsLiveness';
import EarnTransactionMonitor from '../../UI/Earn/components/EarnTransactionMonitor';

import {
setInfuraAvailabilityBlocked,
Expand Down Expand Up @@ -451,6 +452,7 @@ const Main = (props) => {
<RampOrders />
<SwapsLiveness />
<CardVerification />
<EarnTransactionMonitor />
{renderDeprecatedNetworkAlert(
props.chainId,
props.backUpSeedphraseVisible,
Expand Down
2 changes: 1 addition & 1 deletion app/components/UI/Bridge/hooks/useTokens.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ describe('useTokens', () => {
it('filters out non-tradable Tron tokens from remainingTokens', async () => {
const tronMaxBandwidthToken = {
address: '0x789',
symbol: 'Max Bandwidth',
symbol: 'Max-Bandwidth',
name: 'Max Bandwidth',
decimals: 6,
chainId: TrxScope.Mainnet,
Expand Down
12 changes: 6 additions & 6 deletions app/components/UI/Bridge/utils/isTradableToken/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ describe('isTradableToken', () => {
it('returns false for Tron Energy token', () => {
const token = createTestToken({
chainId: TrxScope.Mainnet,
name: 'Energy',
symbol: 'energy',
});

const result = isTradableToken(token);
Expand All @@ -187,7 +187,7 @@ describe('isTradableToken', () => {
it('returns false for Tron Bandwidth token', () => {
const token = createTestToken({
chainId: TrxScope.Mainnet,
name: 'Bandwidth',
symbol: 'bandwidth',
});

const result = isTradableToken(token);
Expand All @@ -198,7 +198,7 @@ describe('isTradableToken', () => {
it('returns false for Tron Max Bandwidth token', () => {
const token = createTestToken({
chainId: TrxScope.Mainnet,
name: 'Max Bandwidth',
symbol: 'max-bandwidth',
});

const result = isTradableToken(token);
Expand All @@ -209,7 +209,7 @@ describe('isTradableToken', () => {
it('returns false for Tron energy token with lowercase', () => {
const token = createTestToken({
chainId: TrxScope.Mainnet,
name: 'energy',
symbol: 'energy',
});

const result = isTradableToken(token);
Expand All @@ -220,7 +220,7 @@ describe('isTradableToken', () => {
it('returns false for Tron bandwidth token with uppercase', () => {
const token = createTestToken({
chainId: TrxScope.Mainnet,
name: 'BANDWIDTH',
symbol: 'BANDWIDTH',
});

const result = isTradableToken(token);
Expand All @@ -231,7 +231,7 @@ describe('isTradableToken', () => {
it('returns false for Tron max bandwidth token with mixed case', () => {
const token = createTestToken({
chainId: TrxScope.Mainnet,
name: 'mAx BaNdWiDtH',
symbol: 'MaX-BaNdWiDtH',
});

const result = isTradableToken(token);
Expand Down
16 changes: 8 additions & 8 deletions app/components/UI/Bridge/utils/isTradableToken/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { TrxScope } from '@metamask/keyring-api';
import { BridgeToken } from '../../types';
import {
TRON_RESOURCE_SYMBOLS,
TronResourceSymbol,
} from '../../../../../core/Multichain/constants';

export const isTradableToken = (token: BridgeToken) => {
if (
token.chainId === TrxScope.Mainnet &&
(token.name?.toLowerCase() === 'energy' ||
token.name?.toLowerCase() === 'bandwidth' ||
token.name?.toLowerCase() === 'max bandwidth')
) {
return false;
if (token.chainId === TrxScope.Mainnet) {
return !TRON_RESOURCE_SYMBOLS.includes(
token.symbol?.toLowerCase() as TronResourceSymbol,
);
}

return true;
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ const createStyles = (theme: Theme) =>
container: {
flex: 1,
backgroundColor: theme.colors.background.default,
paddingHorizontal: 16,
},
containerSpaceAround: {
flex: 1,
backgroundColor: theme.colors.background.default,
justifyContent: 'space-around',
paddingHorizontal: 16,
},
title: {
marginTop: 24,
Expand Down
Loading
Loading