Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(send): confirm tx screen #2997

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import {useFocusEffect} from '@react-navigation/native'
import React, {useEffect, useRef} from 'react'
import {useIntl} from 'react-intl'
import {Keyboard, ScrollView, StyleSheet, View, ViewProps} from 'react-native'
import {SafeAreaView} from 'react-native-safe-area-context'

import {KeyboardAvoidingView, KeyboardSpacer, Spacer, ValidatedTextInput} from '../../../../components'
import {KeyboardAvoidingView, Spacer, ValidatedTextInput} from '../../../../components'
import {ConfirmTx} from '../../../../components/ConfirmTx'
import globalMessages, {confirmationMessages, errorMessages, txLabels} from '../../../../i18n/global-messages'
import {assetsToSendProperties} from '../../../../metrics/helpers'
Expand Down Expand Up @@ -74,11 +75,11 @@ export const ConfirmTxScreen = () => {
if (!yoroiUnsignedTx) throw new Error('Missing yoroiUnsignedTx')

return (
<View style={styles.root}>
<SafeAreaView edges={['left', 'right', 'bottom']} style={styles.root}>
<KeyboardAvoidingView style={{flex: 1}}>
<CurrentBalance />
<ScrollView style={styles.container} persistentScrollbar ref={scrollViewRef}>
<CurrentBalance />

<View style={{paddingTop: 16, paddingHorizontal: 16}}>
<Fees yoroiUnsignedTx={yoroiUnsignedTx} />

<Spacer height={4} />
Expand All @@ -90,14 +91,9 @@ export const ConfirmTxScreen = () => {
{targets.map((target, index) => (
<ReceiverInfo key={`${target.receiver.resolve}:${index}`} target={target} />
))}
</View>

<ScrollView
Copy link
Contributor Author

@banklesss banklesss Jan 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All content scrollable because it caused issues

style={styles.container}
contentContainerStyle={{padding: 16}}
persistentScrollbar
ref={scrollViewRef}
>

<Spacer height={8} />

<PrimaryTotal yoroiUnsignedTx={yoroiUnsignedTx} />

<Spacer height={8} />
Expand All @@ -113,8 +109,6 @@ export const ConfirmTxScreen = () => {
testID="spendingPasswordInput"
/>
)}

<KeyboardSpacer />
</ScrollView>

<Actions>
Expand All @@ -130,7 +124,7 @@ export const ConfirmTxScreen = () => {
/>
</Actions>
</KeyboardAvoidingView>
</View>
</SafeAreaView>
)
}

Expand All @@ -144,6 +138,7 @@ const styles = StyleSheet.create({
container: {
backgroundColor: COLORS.WHITE,
flex: 1,
paddingHorizontal: 16,
},
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import {useIntl} from 'react-intl'
import {StyleSheet, View} from 'react-native'
import {StyleSheet} from 'react-native'

import {Text} from '../../../../../components/Text'
import globalMessages from '../../../../../i18n/global-messages'
Expand All @@ -16,13 +16,13 @@ export const PrimaryTotal = ({yoroiUnsignedTx}: {yoroiUnsignedTx: YoroiUnsignedT
const primaryAmount = Amounts.getAmountFromEntries(yoroiUnsignedTx.entries, wallet.primaryToken.identifier)

return (
<View>
<>
<Text>{strings.total}</Text>

<Text style={styles.amount} testID="totalAmountText">
{formatTokenWithSymbol(primaryAmount.quantity, wallet.primaryToken)}
</Text>
</View>
</>
)
}

Expand Down
Loading