Display buttons above scroll in laconic-wallet approve screens (#72)

* Buttons outside scroll

* Fix ui for signRequest page

* Remove todo
This commit is contained in:
IshaVenikar 2024-04-01 18:00:40 +05:30 committed by GitHub
parent d50cfbfe84
commit 0dea0082b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 88 additions and 83 deletions

View File

@ -209,6 +209,7 @@ const ApproveTransaction = ({ route }: SignRequestProps) => {
<ActivityIndicator size="large" color="#0000ff" />
</View>
) : (
<>
<ScrollView contentContainerStyle={styles.appContainer}>
<View style={styles.dappDetails}>
{requestIcon && (
@ -243,7 +244,9 @@ const ApproveTransaction = ({ route }: SignRequestProps) => {
label={`Amount ${
network === 'eth' ? '(Wei)' : `(${COSMOS_DENOM})`
}`}
data={BigNumber.from(transaction.value?.toString()).toString()}
data={BigNumber.from(
transaction.value?.toString(),
).toString()}
/>
<DataBox
label={`Gas Fees ${
@ -256,6 +259,7 @@ const ApproveTransaction = ({ route }: SignRequestProps) => {
)}
</View>
)}
</ScrollView>
<View style={styles.buttonContainer}>
<Button
mode="contained"
@ -271,7 +275,7 @@ const ApproveTransaction = ({ route }: SignRequestProps) => {
No
</Button>
</View>
</ScrollView>
</>
)}
</>
);

View File

@ -221,6 +221,7 @@ const SignRequest = ({ route }: SignRequestProps) => {
<ActivityIndicator size="large" color="#0000ff" />
</View>
) : (
<>
<ScrollView contentContainerStyle={styles.appContainer}>
<View style={styles.dappDetails}>
{requestIcon && (
@ -252,7 +253,7 @@ const SignRequest = ({ route }: SignRequestProps) => {
<Text variant="bodyLarge">{message}</Text>
</View>
)}
</ScrollView>
<View style={styles.buttonContainer}>
<Button mode="contained" onPress={signMessageHandler}>
Yes
@ -264,7 +265,7 @@ const SignRequest = ({ route }: SignRequestProps) => {
No
</Button>
</View>
</ScrollView>
</>
)}
</>
);

View File

@ -125,21 +125,21 @@ const styles = StyleSheet.create({
requestDirectMessage: {
borderWidth: 1,
borderRadius: 5,
marginTop: 50,
height: '40%',
marginTop: 20,
marginBottom: 50,
height: 500,
alignItems: 'center',
justifyContent: 'center',
padding: 8,
},
approveTransaction: {
height: '40%',
marginBottom: 30,
},
// TODO: Fix button position
buttonContainer: {
flexDirection: 'row',
marginLeft: 20,
marginTop: 20,
marginBottom: 150,
marginBottom: 10,
justifyContent: 'space-evenly',
},
badRequestContainer: {