Skip to content

Commit

Permalink
chore: rebased onto latest main and fixed related bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt561 committed Jan 30, 2025
1 parent a9e4b23 commit 0cce0b6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
11 changes: 8 additions & 3 deletions app/components/UI/Stake/Views/StakeInputView/StakeInputView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { formatEther } from 'ethers/lib/utils';
import { EVENT_PROVIDERS, EVENT_LOCATIONS } from '../../constants/events';
import { StakeInputViewProps } from './StakeInputView.types';
import { getStakeInputViewTitle } from './utils';
import { isStablecoinLendingFeatureEnabled } from '../../constants';

const StakeInputView = ({ route }: StakeInputViewProps) => {
const navigation = useNavigation();
Expand Down Expand Up @@ -147,9 +148,13 @@ const StakeInputView = ({ route }: StakeInputViewProps) => {
: strings('stake.review');

useEffect(() => {
const { action, token } = route.params;

const title = getStakeInputViewTitle(action, token.symbol, token.isETH);
const title = isStablecoinLendingFeatureEnabled()
? getStakeInputViewTitle(
route?.params?.action,
route?.params?.token.symbol,
route?.params?.token.isETH,
)
: strings('stake.stake_eth');

navigation.setOptions(
getStakingNavbar(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ exports[`EarnTokenList render matches screenshot 1`] = `
style={
{
"gap": 12,
"height": 552,
"paddingHorizontal": 16,
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
NavigationProp,
ParamListBase,
} from '@react-navigation/native';
import { MOCK_ETH_ASSET } from '../../../__mocks__/mockData';
import { STAKE_INPUT_VIEW_ACTIONS } from '../../../Views/StakeInputView/StakeInputView.types';

jest.mock('@react-navigation/native', () => ({
...jest.requireActual('@react-navigation/native'),
Expand Down Expand Up @@ -82,6 +84,7 @@ describe('StakingButtons', () => {
style: {},
hasStakedPositions: true,
hasEthToUnstake: true,
asset: MOCK_ETH_ASSET,
};
const { getByText } = renderWithProvider(<StakingButtons {...props} />, {
state: mockInitialState,
Expand All @@ -98,6 +101,7 @@ describe('StakingButtons', () => {
style: {},
hasStakedPositions: true,
hasEthToUnstake: true,
asset: MOCK_ETH_ASSET,
};
const { getByText } = renderWithProvider(<StakingButtons {...props} />, {
state: mockSepoliaNetworkState,
Expand All @@ -112,6 +116,10 @@ describe('StakingButtons', () => {
).toHaveBeenCalledWith('mainnet');
expect(navigate).toHaveBeenCalledWith('StakeScreens', {
screen: Routes.STAKING.STAKE,
params: {
action: STAKE_INPUT_VIEW_ACTIONS.STAKE,
token: MOCK_ETH_ASSET,
},
});
});

Expand All @@ -123,6 +131,7 @@ describe('StakingButtons', () => {
style: {},
hasStakedPositions: true,
hasEthToUnstake: true,
asset: MOCK_ETH_ASSET,
};
const { getByText } = renderWithProvider(<StakingButtons {...props} />, {
state: mockSepoliaNetworkState,
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ SPEC CHECKSUMS:
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
Permission-BluetoothPeripheral: 34ab829f159c6cf400c57bac05f5ba1b0af7a86e
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCT-Folly: 8dc08ca5a393b48b1c523ab6220dfdcc0fe000ad
RCTRequired: fb207f74935626041e7308c9e88dcdda680f1073
RCTSearchApi: 5fc36140c598a74fd831dca924a28ed53bc7aa18
RCTTypeSafety: 146fd11361680250b7580dd1f7f601995cfad1b1
Expand Down

0 comments on commit 0cce0b6

Please sign in to comment.