From 4a3f7942358db48dda1d063170a054dda4273ae3 Mon Sep 17 00:00:00 2001 From: jorbuedo Date: Fri, 27 Sep 2024 15:43:46 +0200 Subject: [PATCH 1/5] fix(wallet-mobile): history tx flicker in android (#3659) --- .../.storybook/storybook.requires.js | 1 - apps/wallet-mobile/src/WalletNavigator.tsx | 1 - .../Scan/common/CodeScannerButton.stories.tsx | 22 --- .../Scan/common/CodeScannerButton.tsx | 25 --- .../Transactions/TxHistoryNavigator.tsx | 51 +---- apps/wallet-mobile/src/hooks/useStatusBar.ts | 11 +- apps/wallet-mobile/src/kernel/navigation.tsx | 2 - .../legacy/Dashboard/DashboardNavigator.tsx | 15 +- .../messages/src/WalletNavigator.json | 96 +++++----- .../Transactions/TxHistoryNavigator.json | 176 +++++++++--------- .../legacy/Dashboard/DashboardNavigator.json | 8 +- 11 files changed, 156 insertions(+), 252 deletions(-) delete mode 100644 apps/wallet-mobile/src/features/Scan/common/CodeScannerButton.stories.tsx delete mode 100644 apps/wallet-mobile/src/features/Scan/common/CodeScannerButton.tsx diff --git a/apps/wallet-mobile/.storybook/storybook.requires.js b/apps/wallet-mobile/.storybook/storybook.requires.js index 6de262169c..f593d32e88 100644 --- a/apps/wallet-mobile/.storybook/storybook.requires.js +++ b/apps/wallet-mobile/.storybook/storybook.requires.js @@ -167,7 +167,6 @@ const getStories = () => { "./src/features/Receive/common/SmallAddressCard/SmallAddressCard.stories.tsx": require("../src/features/Receive/common/SmallAddressCard/SmallAddressCard.stories.tsx"), "./src/features/RegisterCatalyst/useCases/ConfirmVotingTx/ConfirmVotingTx.stories.tsx": require("../src/features/RegisterCatalyst/useCases/ConfirmVotingTx/ConfirmVotingTx.stories.tsx"), "./src/features/RegisterCatalyst/useCases/ShowQrCode/ShowQrCode.stories.tsx": require("../src/features/RegisterCatalyst/useCases/ShowQrCode/ShowQrCode.stories.tsx"), - "./src/features/Scan/common/CodeScannerButton.stories.tsx": require("../src/features/Scan/common/CodeScannerButton.stories.tsx"), "./src/features/Scan/illustrations/Ilustrations.stories.tsx": require("../src/features/Scan/illustrations/Ilustrations.stories.tsx"), "./src/features/Scan/useCases/ScanCodeScreen.stories.tsx": require("../src/features/Scan/useCases/ScanCodeScreen.stories.tsx"), "./src/features/Scan/useCases/ShowCameraPermissionDeniedScreen/OpenDeviceAppSettingsButton.stories.tsx": require("../src/features/Scan/useCases/ShowCameraPermissionDeniedScreen/OpenDeviceAppSettingsButton.stories.tsx"), diff --git a/apps/wallet-mobile/src/WalletNavigator.tsx b/apps/wallet-mobile/src/WalletNavigator.tsx index 65c9d6af3f..fc617478db 100644 --- a/apps/wallet-mobile/src/WalletNavigator.tsx +++ b/apps/wallet-mobile/src/WalletNavigator.tsx @@ -199,7 +199,6 @@ const WalletTabNavigator = () => { ), tabBarLabel: strings.menuTabBarLabel, tabBarTestID: 'menuTabBarButton', - headerTitle: ({children}) => {children}, }} /> diff --git a/apps/wallet-mobile/src/features/Scan/common/CodeScannerButton.stories.tsx b/apps/wallet-mobile/src/features/Scan/common/CodeScannerButton.stories.tsx deleted file mode 100644 index 1436ef2b68..0000000000 --- a/apps/wallet-mobile/src/features/Scan/common/CodeScannerButton.stories.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import {action} from '@storybook/addon-actions' -import {storiesOf} from '@storybook/react-native' -import React from 'react' - -import {CodeScannerButton} from './CodeScannerButton' - -storiesOf('CodeScannerButton', module) - .add('initial', () => { - return - }) - .add('with size', () => { - return - }) - .add('with color', () => { - return - }) - .add('example disabled', () => { - return - }) - .add('example onPress', () => { - return - }) diff --git a/apps/wallet-mobile/src/features/Scan/common/CodeScannerButton.tsx b/apps/wallet-mobile/src/features/Scan/common/CodeScannerButton.tsx deleted file mode 100644 index 70bf42f72f..0000000000 --- a/apps/wallet-mobile/src/features/Scan/common/CodeScannerButton.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import {useTheme} from '@yoroi/theme' -import * as React from 'react' -import {TouchableOpacityProps} from 'react-native' - -import {Icon} from '../../../components/Icon' -import {PressableIcon} from '../../../components/PressableIcon/PressableIcon' - -const fallbackSize = 30 - -type CodeScannerButtonProps = { - size?: number - color?: string -} & TouchableOpacityProps -export const CodeScannerButton = ({size = fallbackSize, color, ...props}: CodeScannerButtonProps) => { - const {colors} = useStyles() - - return -} -const useStyles = () => { - const {color} = useTheme() - const colors = { - iconFallback: color.gray_max, - } - return {colors} -} diff --git a/apps/wallet-mobile/src/features/Transactions/TxHistoryNavigator.tsx b/apps/wallet-mobile/src/features/Transactions/TxHistoryNavigator.tsx index fc1c60348c..4b31210739 100644 --- a/apps/wallet-mobile/src/features/Transactions/TxHistoryNavigator.tsx +++ b/apps/wallet-mobile/src/features/Transactions/TxHistoryNavigator.tsx @@ -9,10 +9,10 @@ import {ThemedPalette, useTheme} from '@yoroi/theme' import {Resolver} from '@yoroi/types' import React from 'react' import {defineMessages, useIntl} from 'react-intl' -import {StyleSheet, View, ViewProps} from 'react-native' +import {TouchableOpacity} from 'react-native' import {Boundary} from '../../components/Boundary/Boundary' -import {Spacer} from '../../components/Spacer/Spacer' +import {Icon} from '../../components/Icon' import {unstoppableApiKey} from '../../kernel/env' import { BackButton, @@ -28,7 +28,6 @@ import {ReceiveProvider} from '../Receive/common/ReceiveProvider' import {DescribeSelectedAddressScreen} from '../Receive/useCases/DescribeSelectedAddressScreen' import {ListMultipleAddressesScreen} from '../Receive/useCases/ListMultipleAddressesScreen' import {RequestSpecificAmountScreen} from '../Receive/useCases/RequestSpecificAmountScreen' -import {CodeScannerButton} from '../Scan/common/CodeScannerButton' import {ScanCodeScreen} from '../Scan/useCases/ScanCodeScreen' import {ShowCameraPermissionDeniedScreen} from '../Scan/useCases/ShowCameraPermissionDeniedScreen/ShowCameraPermissionDeniedScreen' import {ConfirmTxScreen} from '../Send/useCases/ConfirmTx/ConfirmTxScreen' @@ -87,9 +86,6 @@ export const TxHistoryNavigator = () => { }) }, [wallet.externalAddresses, wallet.networkManager.tokenManager, wallet.portfolioPrimaryTokenInfo]) - // navigator components - const headerRightHistory = React.useCallback(() => , []) - // exchange const exchangeManager = React.useMemo(() => { const api = exchangeApiMaker({ @@ -130,7 +126,7 @@ export const TxHistoryNavigator = () => { options={{ title: meta.name, headerTransparent: true, - headerRight: headerRightHistory, + ...(!meta.isReadOnly && {headerRight: () => }), }} /> @@ -538,45 +534,18 @@ const useStrings = () => { } const HeaderRightHistory = React.memo(() => { - const {meta} = useSelectedWallet() const navigation = useNavigation() - const {styles, colors} = useStyles() + const {color} = useTheme() return ( - - {!meta.isReadOnly && ( - <> - navigation.navigate('scan-start', {insideFeature: 'scan'})} - color={colors.gray} - /> - - - - )} - + navigation.navigate('scan-start', {insideFeature: 'scan'})} + style={{paddingRight: 8}} + > + + ) }) -const Row = ({children, style, ...rest}: ViewProps) => ( - - {children} - -) - -const useStyles = () => { - const {color} = useTheme() - - const styles = StyleSheet.create({ - row: { - paddingStart: 8, - }, - }) - - return { - styles, - colors: {gray: color.gray_max}, - } as const -} const sendOptions = (navigationOptions: StackNavigationOptions, color: ThemedPalette) => ({ ...navigationOptions, diff --git a/apps/wallet-mobile/src/hooks/useStatusBar.ts b/apps/wallet-mobile/src/hooks/useStatusBar.ts index fa7f7096b0..c31804a04d 100644 --- a/apps/wallet-mobile/src/hooks/useStatusBar.ts +++ b/apps/wallet-mobile/src/hooks/useStatusBar.ts @@ -6,7 +6,6 @@ import {Platform, StatusBar, StatusBarStyle} from 'react-native' type StatusBarColor = { bgColorAndroid: Color statusBarStyle: StatusBarStyle | undefined - translucent: boolean } export const useStatusBar = (currentRouteName: string | undefined) => { const {color, isDark} = useTheme() @@ -22,8 +21,8 @@ export const useStatusBar = (currentRouteName: string | undefined) => { const style = getStatusBarStyleByRoute({currentRouteName, isDark, color}) statusBarStyleByRoute.current = style if (Platform.OS === 'android') { - StatusBar.setBackgroundColor(style.bgColorAndroid, true) - StatusBar.setTranslucent(style.translucent) + StatusBar.setBackgroundColor(style.bgColorAndroid) + StatusBar.setTranslucent(true) } style.statusBarStyle !== undefined && StatusBar.setBarStyle(style.statusBarStyle, true) } @@ -44,27 +43,23 @@ const getStatusBarStyleByRoute = ({ if (currentRouteName) { if (currentRouteName === 'history-list') { return { - translucent: true, bgColorAndroid: 'rgba(0,0,0,0)', // transparent statusBarStyle: undefined, } } else if (oldBlueRoutes.includes(currentRouteName)) { return { - translucent: false, // old blue, not present in the current theming bgColorAndroid: '#254BC9', statusBarStyle: 'light-content', } } else if (currentRouteName === 'scan-start') { return { - translucent: false, - bgColorAndroid: color.white_static, + bgColorAndroid: color.black_static, statusBarStyle: 'dark-content', } } } return { - translucent: false, bgColorAndroid: isDark ? color.bg_color_max : color.white_static, statusBarStyle: isDark ? 'light-content' : 'dark-content', } diff --git a/apps/wallet-mobile/src/kernel/navigation.tsx b/apps/wallet-mobile/src/kernel/navigation.tsx index b216677f72..fbb1e53a62 100644 --- a/apps/wallet-mobile/src/kernel/navigation.tsx +++ b/apps/wallet-mobile/src/kernel/navigation.tsx @@ -107,7 +107,6 @@ export const defaultMaterialTopTabNavigationOptions = ( // ROUTES export type WalletTabRoutes = { history: NavigatorScreenParams - 'staking-dashboard': NavigatorScreenParams portfolio: NavigatorScreenParams discover: NavigatorScreenParams menu: NavigatorScreenParams @@ -625,7 +624,6 @@ const routesWithTabBar: Record = { portfolio: ['dashboard-portfolio'], discover: ['discover-select-dapp-from-list'], menu: ['_menu'], - 'staking-dashboard': ['staking-dashboard-main'], } const getFocusedRouteName = (state: Partial | NavigationState['routes'][0]['state']): string[] => { diff --git a/apps/wallet-mobile/src/legacy/Dashboard/DashboardNavigator.tsx b/apps/wallet-mobile/src/legacy/Dashboard/DashboardNavigator.tsx index 5fc4727592..96760da7bf 100644 --- a/apps/wallet-mobile/src/legacy/Dashboard/DashboardNavigator.tsx +++ b/apps/wallet-mobile/src/legacy/Dashboard/DashboardNavigator.tsx @@ -27,6 +27,7 @@ export const DashboardNavigator = () => { {children}, }} > @@ -35,27 +36,17 @@ export const DashboardNavigator = () => { component={Dashboard} options={{ title: meta.name, - headerTitle: ({children}) => {children}, }} /> {children}}} /> - {children}}} - /> + - {children}}} - /> + ) diff --git a/apps/wallet-mobile/translations/messages/src/WalletNavigator.json b/apps/wallet-mobile/translations/messages/src/WalletNavigator.json index 3be5bb281d..0618bc2879 100644 --- a/apps/wallet-mobile/translations/messages/src/WalletNavigator.json +++ b/apps/wallet-mobile/translations/messages/src/WalletNavigator.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Transactions", "file": "src/WalletNavigator.tsx", "start": { - "line": 306, + "line": 301, "column": 22, - "index": 10664 + "index": 10506 }, "end": { - "line": 309, + "line": 304, "column": 3, - "index": 10767 + "index": 10609 } }, { @@ -19,14 +19,14 @@ "defaultMessage": "!!!Send", "file": "src/WalletNavigator.tsx", "start": { - "line": 310, + "line": 305, "column": 14, - "index": 10783 + "index": 10625 }, "end": { - "line": 313, + "line": 308, "column": 3, - "index": 10882 + "index": 10724 } }, { @@ -34,14 +34,14 @@ "defaultMessage": "!!!Receive", "file": "src/WalletNavigator.tsx", "start": { - "line": 314, + "line": 309, "column": 17, - "index": 10901 + "index": 10743 }, "end": { - "line": 317, + "line": 312, "column": 3, - "index": 11006 + "index": 10848 } }, { @@ -49,14 +49,14 @@ "defaultMessage": "!!!Dashboard", "file": "src/WalletNavigator.tsx", "start": { - "line": 318, + "line": 313, "column": 19, - "index": 11027 + "index": 10869 }, "end": { - "line": 321, + "line": 316, "column": 3, - "index": 11124 + "index": 10966 } }, { @@ -64,14 +64,14 @@ "defaultMessage": "!!!Delegate", "file": "src/WalletNavigator.tsx", "start": { - "line": 322, + "line": 317, "column": 18, - "index": 11144 + "index": 10986 }, "end": { - "line": 325, + "line": 320, "column": 3, - "index": 11239 + "index": 11081 } }, { @@ -79,14 +79,14 @@ "defaultMessage": "!!!Wallet", "file": "src/WalletNavigator.tsx", "start": { - "line": 326, + "line": 321, "column": 16, - "index": 11257 + "index": 11099 }, "end": { - "line": 329, + "line": 324, "column": 3, - "index": 11355 + "index": 11197 } }, { @@ -94,14 +94,14 @@ "defaultMessage": "!!!Staking", "file": "src/WalletNavigator.tsx", "start": { - "line": 330, + "line": 325, "column": 17, - "index": 11374 + "index": 11216 }, "end": { - "line": 333, + "line": 328, "column": 3, - "index": 11439 + "index": 11281 } }, { @@ -109,14 +109,14 @@ "defaultMessage": "!!!NFT Gallery", "file": "src/WalletNavigator.tsx", "start": { - "line": 334, + "line": 329, "column": 14, - "index": 11455 + "index": 11297 }, "end": { - "line": 337, + "line": 332, "column": 3, - "index": 11549 + "index": 11391 } }, { @@ -124,14 +124,14 @@ "defaultMessage": "!!!Menu", "file": "src/WalletNavigator.tsx", "start": { - "line": 338, + "line": 333, "column": 14, - "index": 11565 + "index": 11407 }, "end": { - "line": 341, + "line": 336, "column": 3, - "index": 11617 + "index": 11459 } }, { @@ -139,14 +139,14 @@ "defaultMessage": "!!!Discover", "file": "src/WalletNavigator.tsx", "start": { - "line": 342, + "line": 337, "column": 18, - "index": 11637 + "index": 11479 }, "end": { - "line": 345, + "line": 340, "column": 3, - "index": 11726 + "index": 11568 } }, { @@ -154,14 +154,14 @@ "defaultMessage": "!!!My wallets", "file": "src/WalletNavigator.tsx", "start": { - "line": 346, + "line": 341, "column": 31, - "index": 11759 + "index": 11601 }, "end": { - "line": 349, + "line": 344, "column": 3, - "index": 11868 + "index": 11710 } }, { @@ -169,14 +169,14 @@ "defaultMessage": "!!!Portfolio", "file": "src/WalletNavigator.tsx", "start": { - "line": 350, + "line": 345, "column": 19, - "index": 11889 + "index": 11731 }, "end": { - "line": 353, + "line": 348, "column": 3, - "index": 11958 + "index": 11800 } } ] \ No newline at end of file diff --git a/apps/wallet-mobile/translations/messages/src/features/Transactions/TxHistoryNavigator.json b/apps/wallet-mobile/translations/messages/src/features/Transactions/TxHistoryNavigator.json index b0b56f094e..ee02d523a1 100644 --- a/apps/wallet-mobile/translations/messages/src/features/Transactions/TxHistoryNavigator.json +++ b/apps/wallet-mobile/translations/messages/src/features/Transactions/TxHistoryNavigator.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Receive", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 418, + "line": 414, "column": 16, - "index": 15317 + "index": 15157 }, "end": { - "line": 421, + "line": 417, "column": 3, - "index": 15406 + "index": 15246 } }, { @@ -19,14 +19,14 @@ "defaultMessage": "!!!Address details", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 422, + "line": 418, "column": 32, - "index": 15440 + "index": 15280 }, "end": { - "line": 425, + "line": 421, "column": 3, - "index": 15553 + "index": 15393 } }, { @@ -34,14 +34,14 @@ "defaultMessage": "!!!Swap", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 426, + "line": 422, "column": 13, - "index": 15568 + "index": 15408 }, "end": { - "line": 429, + "line": 425, "column": 3, - "index": 15641 + "index": 15481 } }, { @@ -49,14 +49,14 @@ "defaultMessage": "!!!Swap from", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 430, + "line": 426, "column": 17, - "index": 15660 + "index": 15500 }, "end": { - "line": 433, + "line": 429, "column": 3, - "index": 15737 + "index": 15577 } }, { @@ -64,14 +64,14 @@ "defaultMessage": "!!!Swap to", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 434, + "line": 430, "column": 15, - "index": 15754 + "index": 15594 }, "end": { - "line": 437, + "line": 433, "column": 3, - "index": 15827 + "index": 15667 } }, { @@ -79,14 +79,14 @@ "defaultMessage": "!!!Slippage Tolerance", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 438, + "line": 434, "column": 21, - "index": 15850 + "index": 15690 }, "end": { - "line": 441, + "line": 437, "column": 3, - "index": 15945 + "index": 15785 } }, { @@ -94,14 +94,14 @@ "defaultMessage": "!!!Select pool", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 442, + "line": 438, "column": 14, - "index": 15961 + "index": 15801 }, "end": { - "line": 445, + "line": 441, "column": 3, - "index": 16042 + "index": 15882 } }, { @@ -109,14 +109,14 @@ "defaultMessage": "!!!Send", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 446, + "line": 442, "column": 13, - "index": 16057 + "index": 15897 }, "end": { - "line": 449, + "line": 445, "column": 3, - "index": 16137 + "index": 15977 } }, { @@ -124,14 +124,14 @@ "defaultMessage": "!!!Scan QR code address", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 450, + "line": 446, "column": 18, - "index": 16157 + "index": 15997 }, "end": { - "line": 453, + "line": 449, "column": 3, - "index": 16258 + "index": 16098 } }, { @@ -139,14 +139,14 @@ "defaultMessage": "!!!Select asset", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 454, + "line": 450, "column": 20, - "index": 16280 + "index": 16120 }, "end": { - "line": 457, + "line": 453, "column": 3, - "index": 16369 + "index": 16209 } }, { @@ -154,14 +154,14 @@ "defaultMessage": "!!!Assets added", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 458, + "line": 454, "column": 26, - "index": 16397 + "index": 16237 }, "end": { - "line": 461, + "line": 457, "column": 3, - "index": 16498 + "index": 16338 } }, { @@ -169,14 +169,14 @@ "defaultMessage": "!!!Edit amount", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 462, + "line": 458, "column": 19, - "index": 16519 + "index": 16359 }, "end": { - "line": 465, + "line": 461, "column": 3, - "index": 16612 + "index": 16452 } }, { @@ -184,14 +184,14 @@ "defaultMessage": "!!!Confirm", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 466, + "line": 462, "column": 16, - "index": 16630 + "index": 16470 }, "end": { - "line": 469, + "line": 465, "column": 3, - "index": 16716 + "index": 16556 } }, { @@ -199,14 +199,14 @@ "defaultMessage": "!!!Share this address to receive payments. To protect your privacy, new addresses are generated automatically once you use them.", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 470, + "line": 466, "column": 19, - "index": 16737 + "index": 16577 }, "end": { - "line": 476, + "line": 472, "column": 3, - "index": 16975 + "index": 16815 } }, { @@ -214,14 +214,14 @@ "defaultMessage": "!!!Confirm transaction", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 477, + "line": 473, "column": 27, - "index": 17004 + "index": 16844 }, "end": { - "line": 480, + "line": 476, "column": 3, - "index": 17097 + "index": 16937 } }, { @@ -229,14 +229,14 @@ "defaultMessage": "!!!Please scan a QR code", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 481, + "line": 477, "column": 13, - "index": 17112 + "index": 16952 }, "end": { - "line": 484, + "line": 480, "column": 3, - "index": 17187 + "index": 17027 } }, { @@ -244,14 +244,14 @@ "defaultMessage": "!!!Success", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 485, + "line": 481, "column": 25, - "index": 17214 + "index": 17054 }, "end": { - "line": 488, + "line": 484, "column": 3, - "index": 17288 + "index": 17128 } }, { @@ -259,14 +259,14 @@ "defaultMessage": "!!!Request specific amount", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 489, + "line": 485, "column": 18, - "index": 17308 + "index": 17148 }, "end": { - "line": 492, + "line": 488, "column": 3, - "index": 17422 + "index": 17262 } }, { @@ -274,14 +274,14 @@ "defaultMessage": "!!!Buy/Sell ADA", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 493, + "line": 489, "column": 28, - "index": 17452 + "index": 17292 }, "end": { - "line": 496, + "line": 492, "column": 3, - "index": 17548 + "index": 17388 } }, { @@ -289,14 +289,14 @@ "defaultMessage": "!!!Buy provider", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 497, + "line": 493, "column": 29, - "index": 17579 + "index": 17419 }, "end": { - "line": 500, + "line": 496, "column": 3, - "index": 17687 + "index": 17527 } }, { @@ -304,14 +304,14 @@ "defaultMessage": "!!!Sell provider", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 501, + "line": 497, "column": 30, - "index": 17719 + "index": 17559 }, "end": { - "line": 504, + "line": 500, "column": 3, - "index": 17829 + "index": 17669 } }, { @@ -319,14 +319,14 @@ "defaultMessage": "!!!Tx Details", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 505, + "line": 501, "column": 18, - "index": 17849 + "index": 17689 }, "end": { - "line": 508, + "line": 504, "column": 3, - "index": 17943 + "index": 17783 } } ] \ No newline at end of file diff --git a/apps/wallet-mobile/translations/messages/src/legacy/Dashboard/DashboardNavigator.json b/apps/wallet-mobile/translations/messages/src/legacy/Dashboard/DashboardNavigator.json index fe2cf7cfd7..9198d0e581 100644 --- a/apps/wallet-mobile/translations/messages/src/legacy/Dashboard/DashboardNavigator.json +++ b/apps/wallet-mobile/translations/messages/src/legacy/Dashboard/DashboardNavigator.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Staking Center", "file": "src/legacy/Dashboard/DashboardNavigator.tsx", "start": { - "line": 73, + "line": 64, "column": 9, - "index": 2494 + "index": 2065 }, "end": { - "line": 76, + "line": 67, "column": 3, - "index": 2582 + "index": 2153 } } ] \ No newline at end of file From 3dc1d5a9cac3ed51b53051a347e9c10cb31e0479 Mon Sep 17 00:00:00 2001 From: Rahul <62512215+rahulnr7@users.noreply.github.com> Date: Fri, 27 Sep 2024 19:30:38 +0530 Subject: [PATCH 2/5] fix(dApp Explorer): fix dialog height while disconnecting dApps (#3660) --- .../DAppListItem/DAppListItem.tsx | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/apps/wallet-mobile/src/features/Discover/useCases/SelectDappFromList/DAppListItem/DAppListItem.tsx b/apps/wallet-mobile/src/features/Discover/useCases/SelectDappFromList/DAppListItem/DAppListItem.tsx index 63a4d5cca8..d51384a147 100644 --- a/apps/wallet-mobile/src/features/Discover/useCases/SelectDappFromList/DAppListItem/DAppListItem.tsx +++ b/apps/wallet-mobile/src/features/Discover/useCases/SelectDappFromList/DAppListItem/DAppListItem.tsx @@ -2,16 +2,7 @@ import {useDappConnector} from '@yoroi/dapp-connector' import {useTheme} from '@yoroi/theme' import {Image} from 'expo-image' import * as React from 'react' -import { - Alert, - Linking, - StyleSheet, - Text, - TouchableOpacity, - TouchableWithoutFeedback, - useWindowDimensions, - View, -} from 'react-native' +import {Alert, Linking, StyleSheet, Text, TouchableOpacity, TouchableWithoutFeedback, View} from 'react-native' import {useSafeAreaInsets} from 'react-native-safe-area-context' import uuid from 'uuid' @@ -46,13 +37,7 @@ export const DAppListItem = ({dApp, connected, onPress}: Props) => { const {manager} = useDappConnector() const {track} = useMetrics() - const HEIGHT_SCREEN = useWindowDimensions().height - - // For devices like iPhone SE wuth logical pixel height < 700, we need a bottom sheet with more height - const heightDialogByHeightScreen = - HEIGHT_SCREEN < 700 - ? (HEIGHT_SCREEN * (dApp.isSingleAddress ? 70 : 50)) / 100 - : (HEIGHT_SCREEN * (dApp.isSingleAddress ? 50 : 40)) / 100 + const heightDialogByHeightScreen = dApp.isSingleAddress ? 460 : 340 const heightDialogByInit = INIT_DIALOG_DAPP_ACTIONS_HEIGHT + insets.bottom const dialogHeight = heightDialogByInit < heightDialogByHeightScreen ? heightDialogByHeightScreen : heightDialogByInit From 688feb1453e65d905ddf8979a4ee9a21e5cc786e Mon Sep 17 00:00:00 2001 From: jorbuedo Date: Fri, 27 Sep 2024 16:21:10 +0200 Subject: [PATCH 3/5] feature: update catalyst min ada for fund 13 (#3661) --- .../RegisterCatalyst/common/InsufficientFundsModal.tsx | 2 +- .../WalletManager/common/adapters/cardano/catalyst-config.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/wallet-mobile/src/features/RegisterCatalyst/common/InsufficientFundsModal.tsx b/apps/wallet-mobile/src/features/RegisterCatalyst/common/InsufficientFundsModal.tsx index 7ee8ff18ac..822046690b 100644 --- a/apps/wallet-mobile/src/features/RegisterCatalyst/common/InsufficientFundsModal.tsx +++ b/apps/wallet-mobile/src/features/RegisterCatalyst/common/InsufficientFundsModal.tsx @@ -23,7 +23,7 @@ export const InsufficientFundsModal = () => { const primaryBalance = usePortfolioPrimaryBalance({wallet}) const fmtMinPrimaryBalance = formatter({ info: wallet.portfolioPrimaryTokenInfo, - quantity: catalystConfig.displayedMinAda, + quantity: catalystConfig.minAda, }) const fmtPrimaryBalance = formatter(primaryBalance) diff --git a/apps/wallet-mobile/src/features/WalletManager/common/adapters/cardano/catalyst-config.ts b/apps/wallet-mobile/src/features/WalletManager/common/adapters/cardano/catalyst-config.ts index 9114c1452b..9f141bcf5d 100644 --- a/apps/wallet-mobile/src/features/WalletManager/common/adapters/cardano/catalyst-config.ts +++ b/apps/wallet-mobile/src/features/WalletManager/common/adapters/cardano/catalyst-config.ts @@ -3,6 +3,5 @@ import {freeze} from 'immer' import {cardanoConfig} from './cardano-config' export const catalystConfig = freeze({ - minAda: 450n * cardanoConfig.denominations.ada, - displayedMinAda: 500n * cardanoConfig.denominations.ada, + minAda: 25n * cardanoConfig.denominations.ada, } as const) From 6aad749a6c99eb4b05419a256f5f3ad5873d65ae Mon Sep 17 00:00:00 2001 From: jorbuedo Date: Fri, 27 Sep 2024 17:14:16 +0200 Subject: [PATCH 4/5] fix(wallet-mobile: nft white flash (#3662) --- .../Portfolio/common/MediaPreview/MediaPreview.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/wallet-mobile/src/features/Portfolio/common/MediaPreview/MediaPreview.tsx b/apps/wallet-mobile/src/features/Portfolio/common/MediaPreview/MediaPreview.tsx index a54229fa7c..8dacd28a7c 100644 --- a/apps/wallet-mobile/src/features/Portfolio/common/MediaPreview/MediaPreview.tsx +++ b/apps/wallet-mobile/src/features/Portfolio/common/MediaPreview/MediaPreview.tsx @@ -64,7 +64,13 @@ export const MediaPreview = ({ {loading && ( - + From 7ae330b25f4f1eefc519cd3b22dd84d223e78375 Mon Sep 17 00:00:00 2001 From: Rahul <62512215+rahulnr7@users.noreply.github.com> Date: Tue, 1 Oct 2024 20:01:14 +0530 Subject: [PATCH 5/5] fix(wallet-mobile): remove decimals from hidden values (#3667) --- .../Settings/PrivacyMode/PrivacyMode.tsx | 2 +- .../src/legacy/Dashboard/UserSummary.tsx | 6 +- .../messages/src/WalletNavigator.json | 96 +++++++++---------- .../src/legacy/Dashboard/UserSummary.json | 16 ++-- 4 files changed, 60 insertions(+), 60 deletions(-) diff --git a/apps/wallet-mobile/src/features/Settings/PrivacyMode/PrivacyMode.tsx b/apps/wallet-mobile/src/features/Settings/PrivacyMode/PrivacyMode.tsx index 793876cc65..b2b95eb2a3 100644 --- a/apps/wallet-mobile/src/features/Settings/PrivacyMode/PrivacyMode.tsx +++ b/apps/wallet-mobile/src/features/Settings/PrivacyMode/PrivacyMode.tsx @@ -68,6 +68,6 @@ export const usePrivacyMode = () => { isTogglePrivacyModeLoading, setPrivacyModeOff: () => writePrivacyMode('HIDDEN'), setPrivacyModeOn: () => writePrivacyMode('SHOWN'), - privacyPlaceholder: '*.******', + privacyPlaceholder: '******', } } diff --git a/apps/wallet-mobile/src/legacy/Dashboard/UserSummary.tsx b/apps/wallet-mobile/src/legacy/Dashboard/UserSummary.tsx index 5dfb74f53f..9f1266b3cc 100644 --- a/apps/wallet-mobile/src/legacy/Dashboard/UserSummary.tsx +++ b/apps/wallet-mobile/src/legacy/Dashboard/UserSummary.tsx @@ -55,7 +55,7 @@ export const UserSummary = ({totalAdaSum, totalRewards, totalDelegated, onWithdr ? totalAdaSum != null ? formatAdaWithText(asQuantity(totalAdaSum), wallet.portfolioPrimaryTokenInfo) : '-' - : '**.******'} + : '******'} @@ -82,7 +82,7 @@ export const UserSummary = ({totalAdaSum, totalRewards, totalDelegated, onWithdr ? totalRewards != null ? formatAdaWithText(asQuantity(totalRewards), wallet.portfolioPrimaryTokenInfo) : '-' - : '**.******'} + : '******'} @@ -109,7 +109,7 @@ export const UserSummary = ({totalAdaSum, totalRewards, totalDelegated, onWithdr ? totalDelegated != null ? formatAdaWithText(asQuantity(totalDelegated), wallet.portfolioPrimaryTokenInfo) : '-' - : '**.******'} + : '******'} diff --git a/apps/wallet-mobile/translations/messages/src/WalletNavigator.json b/apps/wallet-mobile/translations/messages/src/WalletNavigator.json index 0618bc2879..b8cde09ac5 100644 --- a/apps/wallet-mobile/translations/messages/src/WalletNavigator.json +++ b/apps/wallet-mobile/translations/messages/src/WalletNavigator.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Transactions", "file": "src/WalletNavigator.tsx", "start": { - "line": 301, + "line": 305, "column": 22, - "index": 10506 + "index": 10584 }, "end": { - "line": 304, + "line": 308, "column": 3, - "index": 10609 + "index": 10687 } }, { @@ -19,14 +19,14 @@ "defaultMessage": "!!!Send", "file": "src/WalletNavigator.tsx", "start": { - "line": 305, + "line": 309, "column": 14, - "index": 10625 + "index": 10703 }, "end": { - "line": 308, + "line": 312, "column": 3, - "index": 10724 + "index": 10802 } }, { @@ -34,14 +34,14 @@ "defaultMessage": "!!!Receive", "file": "src/WalletNavigator.tsx", "start": { - "line": 309, + "line": 313, "column": 17, - "index": 10743 + "index": 10821 }, "end": { - "line": 312, + "line": 316, "column": 3, - "index": 10848 + "index": 10926 } }, { @@ -49,14 +49,14 @@ "defaultMessage": "!!!Dashboard", "file": "src/WalletNavigator.tsx", "start": { - "line": 313, + "line": 317, "column": 19, - "index": 10869 + "index": 10947 }, "end": { - "line": 316, + "line": 320, "column": 3, - "index": 10966 + "index": 11044 } }, { @@ -64,14 +64,14 @@ "defaultMessage": "!!!Delegate", "file": "src/WalletNavigator.tsx", "start": { - "line": 317, + "line": 321, "column": 18, - "index": 10986 + "index": 11064 }, "end": { - "line": 320, + "line": 324, "column": 3, - "index": 11081 + "index": 11159 } }, { @@ -79,14 +79,14 @@ "defaultMessage": "!!!Wallet", "file": "src/WalletNavigator.tsx", "start": { - "line": 321, + "line": 325, "column": 16, - "index": 11099 + "index": 11177 }, "end": { - "line": 324, + "line": 328, "column": 3, - "index": 11197 + "index": 11275 } }, { @@ -94,14 +94,14 @@ "defaultMessage": "!!!Staking", "file": "src/WalletNavigator.tsx", "start": { - "line": 325, + "line": 329, "column": 17, - "index": 11216 + "index": 11294 }, "end": { - "line": 328, + "line": 332, "column": 3, - "index": 11281 + "index": 11359 } }, { @@ -109,14 +109,14 @@ "defaultMessage": "!!!NFT Gallery", "file": "src/WalletNavigator.tsx", "start": { - "line": 329, + "line": 333, "column": 14, - "index": 11297 + "index": 11375 }, "end": { - "line": 332, + "line": 336, "column": 3, - "index": 11391 + "index": 11469 } }, { @@ -124,14 +124,14 @@ "defaultMessage": "!!!Menu", "file": "src/WalletNavigator.tsx", "start": { - "line": 333, + "line": 337, "column": 14, - "index": 11407 + "index": 11485 }, "end": { - "line": 336, + "line": 340, "column": 3, - "index": 11459 + "index": 11537 } }, { @@ -139,14 +139,14 @@ "defaultMessage": "!!!Discover", "file": "src/WalletNavigator.tsx", "start": { - "line": 337, + "line": 341, "column": 18, - "index": 11479 + "index": 11557 }, "end": { - "line": 340, + "line": 344, "column": 3, - "index": 11568 + "index": 11646 } }, { @@ -154,14 +154,14 @@ "defaultMessage": "!!!My wallets", "file": "src/WalletNavigator.tsx", "start": { - "line": 341, + "line": 345, "column": 31, - "index": 11601 + "index": 11679 }, "end": { - "line": 344, + "line": 348, "column": 3, - "index": 11710 + "index": 11788 } }, { @@ -169,14 +169,14 @@ "defaultMessage": "!!!Portfolio", "file": "src/WalletNavigator.tsx", "start": { - "line": 345, + "line": 349, "column": 19, - "index": 11731 + "index": 11809 }, "end": { - "line": 348, + "line": 352, "column": 3, - "index": 11800 + "index": 11878 } } ] \ No newline at end of file diff --git a/apps/wallet-mobile/translations/messages/src/legacy/Dashboard/UserSummary.json b/apps/wallet-mobile/translations/messages/src/legacy/Dashboard/UserSummary.json index f275f60b6c..e6b7b547c6 100644 --- a/apps/wallet-mobile/translations/messages/src/legacy/Dashboard/UserSummary.json +++ b/apps/wallet-mobile/translations/messages/src/legacy/Dashboard/UserSummary.json @@ -6,12 +6,12 @@ "start": { "line": 180, "column": 9, - "index": 5288 + "index": 5279 }, "end": { "line": 183, "column": 3, - "index": 5390 + "index": 5381 } }, { @@ -21,12 +21,12 @@ "start": { "line": 184, "column": 16, - "index": 5408 + "index": 5399 }, "end": { "line": 187, "column": 3, - "index": 5518 + "index": 5509 } }, { @@ -36,12 +36,12 @@ "start": { "line": 188, "column": 18, - "index": 5538 + "index": 5529 }, "end": { "line": 191, "column": 3, - "index": 5652 + "index": 5643 } }, { @@ -51,12 +51,12 @@ "start": { "line": 192, "column": 23, - "index": 5677 + "index": 5668 }, "end": { "line": 195, "column": 3, - "index": 5789 + "index": 5780 } } ] \ No newline at end of file