-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: QR hardware signing in new designs #13261
base: main
Are you sure you want to change the base?
Changes from 13 commits
8c2704d
bbe41a0
fc989e0
1d07792
ea54a3b
4948b52
e53cf03
5f8762d
2ea4008
7e82445
148aaff
590d488
86a442b
4528ddb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import React from 'react'; | ||
import { View } from 'react-native'; | ||
import { ScrollView, View } from 'react-native'; | ||
|
||
import { useStyles } from '../../../../component-library/hooks'; | ||
import BottomModal from '../components/UI/BottomModal'; | ||
import AccountNetworkInfo from '../components/Confirm/AccountNetworkInfo'; | ||
import Footer from '../components/Confirm/Footer'; | ||
import Info from '../components/Confirm/Info'; | ||
import { QRHardwareContextProvider } from '../context/QRHardwareContext/QRHardwareContext'; | ||
import SignatureBlockaidBanner from '../components/Confirm/SignatureBlockaidBanner'; | ||
import Title from '../components/Confirm/Title'; | ||
import useApprovalRequest from '../hooks/useApprovalRequest'; | ||
|
@@ -22,18 +23,26 @@ const Confirm = () => { | |
} | ||
|
||
return ( | ||
<BottomModal canCloseOnBackdropClick={false}> | ||
<View style={styles.container} testID={approvalRequest?.type}> | ||
<View> | ||
<Title /> | ||
{/* TODO: component SignatureBlockaidBanner to be removed once we implement alert system in mobile */} | ||
<SignatureBlockaidBanner /> | ||
<AccountNetworkInfo /> | ||
<Info /> | ||
<QRHardwareContextProvider> | ||
<BottomModal canCloseOnBackdropClick={false}> | ||
<View style={styles.container} testID={approvalRequest?.type}> | ||
<View> | ||
<Title /> | ||
<View style={styles.scrollWrapper}> | ||
<ScrollView> | ||
<View style={styles.scrollableSection}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ScrollView accepts style, contentContainerStyle, and other style props that can be used to avoid adding extra View components around or within ScrollView There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good idea, I could remove inner view, but not outer one. |
||
{/* TODO: component SignatureBlockaidBanner to be removed once we implement alert system in mobile */} | ||
<SignatureBlockaidBanner /> | ||
<AccountNetworkInfo /> | ||
<Info /> | ||
</View> | ||
</ScrollView> | ||
</View> | ||
</View> | ||
<Footer /> | ||
</View> | ||
<Footer /> | ||
</View> | ||
</BottomModal> | ||
</BottomModal> | ||
</QRHardwareContextProvider> | ||
); | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { StyleSheet } from 'react-native'; | ||
|
||
import { Theme } from '../../../../../../../util/theme/models'; | ||
import { fontStyles } from '../../../../../../../styles/common'; | ||
|
||
const styleSheet = (params: { theme: Theme }) => { | ||
const { theme } = params; | ||
|
||
return StyleSheet.create({ | ||
container: { | ||
width: '100%', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
backgroundColor: theme.colors.background.default, | ||
}, | ||
title: { | ||
flexDirection: 'row', | ||
justifyContent: 'center', | ||
marginTop: 20, | ||
marginBottom: 20, | ||
}, | ||
titleText: { | ||
...fontStyles.normal, | ||
fontSize: 14, | ||
color: theme.colors.text.default, | ||
}, | ||
errorText: { | ||
...fontStyles.normal, | ||
fontSize: 12, | ||
color: theme.colors.error.default, | ||
}, | ||
alert: { | ||
marginHorizontal: 16, | ||
marginTop: 12, | ||
}, | ||
}); | ||
}; | ||
|
||
export default styleSheet; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason for the fixed height? I was able to remove this in this PR and it seems to work. This way no excess space for confirmations with less content.
I do have a PR that is open that applies the BottomSheet and scroll container here. With this, the header and footer are also fixed whilst having scrollable content. We will need to resolve the conflict in one of our PRs
#13268
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
min height helpe confirmation page not look too short if there is less content
yep we will need to resolve conflicts