diff --git a/apps/wallet-mobile/.storybook/storybook.requires.js b/apps/wallet-mobile/.storybook/storybook.requires.js index 4b23088ead..91669807cf 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 7165987d92..5b857bb2fb 100644 --- a/apps/wallet-mobile/src/WalletNavigator.tsx +++ b/apps/wallet-mobile/src/WalletNavigator.tsx @@ -200,7 +200,6 @@ const WalletTabNavigator = () => { ), tabBarLabel: strings.menuTabBarLabel, tabBarTestID: 'menuTabBarButton', - headerTitle: ({children}) => {children}, }} /> 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 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 && ( - + 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/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/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/features/Transactions/TxHistoryNavigator.tsx b/apps/wallet-mobile/src/features/Transactions/TxHistoryNavigator.tsx index 89612c3715..5e49b3da57 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 {FailedTxScreen} from '../Send/useCases/ConfirmTx/FailedTx/FailedTxScreen' @@ -86,9 +85,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({ @@ -129,7 +125,7 @@ export const TxHistoryNavigator = () => { options={{ title: meta.name, headerTransparent: true, - headerRight: headerRightHistory, + ...(!meta.isReadOnly && {headerRight: () => }), }} /> @@ -528,45 +524,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/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) 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 cb9d53ef10..1243abcf22 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 @@ -648,7 +647,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/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/features/Transactions/TxHistoryNavigator.json b/apps/wallet-mobile/translations/messages/src/features/Transactions/TxHistoryNavigator.json index 2d720b487b..7c2a6edb48 100644 --- a/apps/wallet-mobile/translations/messages/src/features/Transactions/TxHistoryNavigator.json +++ b/apps/wallet-mobile/translations/messages/src/features/Transactions/TxHistoryNavigator.json @@ -4,7 +4,7 @@ "defaultMessage": "!!!Receive", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 408, + "line": 404, "column": 16, "index": 14957 }, @@ -24,7 +24,7 @@ "index": 15080 }, "end": { - "line": 415, + "line": 411, "column": 3, "index": 15193 } @@ -34,12 +34,12 @@ "defaultMessage": "!!!Swap", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 416, + "line": 412, "column": 13, "index": 15208 }, "end": { - "line": 419, + "line": 415, "column": 3, "index": 15281 } @@ -64,12 +64,12 @@ "defaultMessage": "!!!Swap to", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 424, + "line": 420, "column": 15, "index": 15394 }, "end": { - "line": 427, + "line": 423, "column": 3, "index": 15467 } @@ -79,7 +79,7 @@ "defaultMessage": "!!!Slippage Tolerance", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 428, + "line": 424, "column": 21, "index": 15490 }, @@ -99,7 +99,7 @@ "index": 15601 }, "end": { - "line": 435, + "line": 431, "column": 3, "index": 15682 } @@ -109,12 +109,12 @@ "defaultMessage": "!!!Send", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 436, + "line": 432, "column": 13, "index": 15697 }, "end": { - "line": 439, + "line": 435, "column": 3, "index": 15777 } @@ -139,12 +139,12 @@ "defaultMessage": "!!!Select asset", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 444, + "line": 440, "column": 20, "index": 15920 }, "end": { - "line": 447, + "line": 443, "column": 3, "index": 16009 } @@ -154,7 +154,7 @@ "defaultMessage": "!!!Assets added", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 448, + "line": 444, "column": 26, "index": 16037 }, @@ -174,7 +174,7 @@ "index": 16159 }, "end": { - "line": 455, + "line": 451, "column": 3, "index": 16252 } @@ -184,12 +184,12 @@ "defaultMessage": "!!!Confirm", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 456, + "line": 452, "column": 16, "index": 16270 }, "end": { - "line": 459, + "line": 455, "column": 3, "index": 16356 } @@ -204,7 +204,7 @@ "index": 16377 }, "end": { - "line": 466, + "line": 462, "column": 3, "index": 16615 } @@ -214,7 +214,7 @@ "defaultMessage": "!!!Confirm transaction", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 467, + "line": 463, "column": 27, "index": 16644 }, @@ -234,7 +234,7 @@ "index": 16752 }, "end": { - "line": 474, + "line": 470, "column": 3, "index": 16827 } @@ -244,12 +244,12 @@ "defaultMessage": "!!!Success", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 475, + "line": 471, "column": 25, "index": 16854 }, "end": { - "line": 478, + "line": 474, "column": 3, "index": 16928 } @@ -259,7 +259,7 @@ "defaultMessage": "!!!Request specific amount", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 479, + "line": 475, "column": 18, "index": 16948 }, @@ -279,7 +279,7 @@ "index": 17092 }, "end": { - "line": 486, + "line": 482, "column": 3, "index": 17188 } @@ -289,7 +289,7 @@ "defaultMessage": "!!!Buy provider", "file": "src/features/Transactions/TxHistoryNavigator.tsx", "start": { - "line": 487, + "line": 483, "column": 29, "index": 17219 }, 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 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