Skip to content

Commit

Permalink
fix(staking): adjust withdraw dialog height
Browse files Browse the repository at this point in the history
  • Loading branch information
banklesss committed Sep 18, 2024
1 parent dfc4ce1 commit f06c69f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions apps/wallet-mobile/src/legacy/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -71,7 +80,7 @@ export const Dashboard = () => {
openModal(
'',
<WithdrawStakingRewards wallet={wallet} onSuccess={() => resetToTxHistory()} onCancel={() => closeModal()} />,
450,
windowHeight * 0.8,
)
}

Expand Down

0 comments on commit f06c69f

Please sign in to comment.