From f06c69f68d64565434cd114a94563e30b802da1f Mon Sep 17 00:00:00 2001 From: Javier Bueno Date: Wed, 18 Sep 2024 11:00:49 +0200 Subject: [PATCH] fix(staking): adjust withdraw dialog height --- .../src/legacy/Dashboard/Dashboard.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/wallet-mobile/src/legacy/Dashboard/Dashboard.tsx b/apps/wallet-mobile/src/legacy/Dashboard/Dashboard.tsx index cc27a4ec46..4fdb662192 100644 --- a/apps/wallet-mobile/src/legacy/Dashboard/Dashboard.tsx +++ b/apps/wallet-mobile/src/legacy/Dashboard/Dashboard.tsx @@ -5,7 +5,15 @@ import {useTheme} from '@yoroi/theme' import BigNumber from 'bignumber.js' import React from 'react' import {defineMessages, useIntl} from 'react-intl' -import {ActivityIndicator, RefreshControl, ScrollView, StyleSheet, View, ViewProps} from 'react-native' +import { + ActivityIndicator, + RefreshControl, + ScrollView, + StyleSheet, + useWindowDimensions, + View, + ViewProps, +} from 'react-native' import {SafeAreaView} from 'react-native-safe-area-context' import {Banner} from '../../components/Banner/Banner' @@ -44,6 +52,7 @@ export const Dashboard = () => { const {isLoading: isSyncing, sync} = useSync(wallet) const isOnline = useIsOnline(wallet) const {openModal, closeModal} = useModal() + const {height: windowHeight} = useWindowDimensions() const balances = useBalances(wallet) const primaryAmount = Amounts.getAmount(balances, wallet.portfolioPrimaryTokenInfo.id) @@ -71,7 +80,7 @@ export const Dashboard = () => { openModal( '', resetToTxHistory()} onCancel={() => closeModal()} />, - 450, + windowHeight * 0.8, ) }