Skip to content

Commit

Permalink
fix: snapshots updated
Browse files Browse the repository at this point in the history
  • Loading branch information
juanky201271 committed Feb 10, 2025
1 parent 3787782 commit 4d62725
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 27 deletions.
8 changes: 4 additions & 4 deletions __tests__/__snapshots__/History.snapshot.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ exports[`Component History - test History currency USD, privacy high & mode adva
"borderColor": "#18bd18",
"borderRadius": 15,
"borderWidth": 1,
"marginHorizontal": 0,
"marginHorizontal": 10,
"paddingHorizontal": 10,
"paddingVertical": 5,
}
Expand Down Expand Up @@ -875,7 +875,7 @@ exports[`Component History - test History currency USD, privacy high & mode adva
"borderColor": "#888888",
"borderRadius": 15,
"borderWidth": 1,
"marginHorizontal": 10,
"marginHorizontal": 0,
"paddingHorizontal": 10,
"paddingVertical": 5,
}
Expand Down Expand Up @@ -1395,7 +1395,7 @@ exports[`Component History - test History no currency, privacy normal & mode bas
"borderColor": "#18bd18",
"borderRadius": 15,
"borderWidth": 1,
"marginHorizontal": 0,
"marginHorizontal": 10,
"paddingHorizontal": 10,
"paddingVertical": 5,
}
Expand Down Expand Up @@ -1455,7 +1455,7 @@ exports[`Component History - test History no currency, privacy normal & mode bas
"borderColor": "#888888",
"borderRadius": 15,
"borderWidth": 1,
"marginHorizontal": 10,
"marginHorizontal": 0,
"paddingHorizontal": 10,
"paddingVertical": 5,
}
Expand Down
10 changes: 6 additions & 4 deletions __tests__/__snapshots__/Messages.snapshot.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Component Messages - test Messages currency USD, privacy high & mode advanced - snapshot 1`] = `
<View
<RCTSafeAreaView
accessibilityLabel="text translated"
accessible={true}
style={
{
"backgroundColor": "#011401",
"display": "flex",
"height": "100%",
"justifyContent": "flex-start",
Expand Down Expand Up @@ -614,15 +615,16 @@ exports[`Component Messages - test Messages currency USD, privacy high & mode ad
}
}
/>
</View>
</RCTSafeAreaView>
`;

exports[`Component Messages - test Messages no currency, privacy normal & mode basic - snapshot 1`] = `
<View
<RCTSafeAreaView
accessibilityLabel="text translated"
accessible={true}
style={
{
"backgroundColor": "#011401",
"display": "flex",
"height": "100%",
"justifyContent": "flex-start",
Expand Down Expand Up @@ -1196,5 +1198,5 @@ exports[`Component Messages - test Messages no currency, privacy normal & mode b
}
}
/>
</View>
</RCTSafeAreaView>
`;
28 changes: 14 additions & 14 deletions components/History/components/ValueTransferLine.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable react-native/no-inline-styles */
import React, { useContext, useEffect, useRef, useState } from 'react';
import { Animated, Dimensions, Platform, View, TouchableOpacity } from 'react-native';
import React, { useContext, useRef } from 'react';
import { Animated, Platform, View, TouchableOpacity } from 'react-native';
import { useTheme } from '@react-navigation/native';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import {
Expand All @@ -9,7 +9,7 @@ import {
faRefresh,
faComment,
faTriangleExclamation,
faComments,
//faComments,
faFileLines,
faPaperPlane,
} from '@fortawesome/free-solid-svg-icons';
Expand All @@ -35,7 +35,7 @@ import 'moment/locale/ru';
import { ContextAppLoaded } from '../../../app/context';
import AddressItem from '../../Components/AddressItem';
import { RPCValueTransfersStatusEnum } from '../../../app/rpc/enums/RPCValueTransfersStatusEnum';
import Utils from '../../../app/utils';
//import Utils from '../../../app/utils';

type ValueTransferLineProps = {
index: number;
Expand All @@ -56,7 +56,7 @@ const ValueTransferLine: React.FunctionComponent<ValueTransferLineProps> = ({
setValueTransferDetailIndex,
setValueTransferDetailModalShowing,
nextLineWithSameTxid,
setMessagesAddressModalShowing,
//setMessagesAddressModalShowing,
addressProtected,
}) => {
const context = useContext(ContextAppLoaded);
Expand All @@ -74,13 +74,13 @@ const ValueTransferLine: React.FunctionComponent<ValueTransferLineProps> = ({
const { colors } = useTheme() as unknown as ThemeType;
moment.locale(language);

const [messagesAddress, setMessagesAddress] = useState<boolean>(false);
//const [messagesAddress, setMessagesAddress] = useState<boolean>(false);

const dimensions = {
width: Dimensions.get('window').width,
height: Dimensions.get('window').height,
};
const maxWidthHit = useRef<boolean>(false);
//const dimensions = {
// width: Dimensions.get('window').width,
// height: Dimensions.get('window').height,
//};
//const maxWidthHit = useRef<boolean>(false);
const swipeableRef = useRef<Swipeable | null>(null);

const getAmountColor = (_vt: ValueTransferType) => {
Expand All @@ -104,9 +104,9 @@ const ValueTransferLine: React.FunctionComponent<ValueTransferLineProps> = ({
return _vt.memos && _vt.memos.length > 0 && !!_vt.memos.join('');
};

useEffect(() => {
setMessagesAddress(Utils.isMessagesAddress(vt));
}, [vt]);
//useEffect(() => {
// setMessagesAddress(Utils.isMessagesAddress(vt));
//}, [vt]);

/*
const handleRenderRightActions = (
Expand Down
5 changes: 0 additions & 5 deletions components/Messages/MessagesModal.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
/* eslint-disable react-native/no-inline-styles */
import React, { useContext } from 'react';
import { SelectServerEnum, SendPageStateClass, ServerType } from '../../app/AppState';
import ContactList from './components/ContactList';
import { useTheme } from '@react-navigation/native';
import { ThemeType } from '../../app/types';
import moment from 'moment';
import { ContextAppLoaded } from '../../app/context';
import { SafeAreaView } from 'react-native-safe-area-context';

type MessagesModalProps = {
// side menu
Expand Down Expand Up @@ -48,7 +44,6 @@ const MessagesModal: React.FunctionComponent<MessagesModalProps> = ({
}) => {
const context = useContext(ContextAppLoaded);
const { language } = context;
const { colors } = useTheme() as unknown as ThemeType;
moment.locale(language);

return (
Expand Down

0 comments on commit 4d62725

Please sign in to comment.