From 0dea0082b4ff7dfed94c8a09e7341a1a74310ecb Mon Sep 17 00:00:00 2001
From: IshaVenikar <145848618+IshaVenikar@users.noreply.github.com>
Date: Mon, 1 Apr 2024 18:00:40 +0530
Subject: [PATCH] Display buttons above scroll in laconic-wallet approve
screens (#72)
* Buttons outside scroll
* Fix ui for signRequest page
* Remove todo
---
src/screens/ApproveTransaction.tsx | 96 ++++++++++++++++--------------
src/screens/SignRequest.tsx | 65 ++++++++++----------
src/styles/stylesheet.js | 10 ++--
3 files changed, 88 insertions(+), 83 deletions(-)
diff --git a/src/screens/ApproveTransaction.tsx b/src/screens/ApproveTransaction.tsx
index 5eac3b0..a828806 100644
--- a/src/screens/ApproveTransaction.tsx
+++ b/src/screens/ApproveTransaction.tsx
@@ -209,53 +209,57 @@ const ApproveTransaction = ({ route }: SignRequestProps) => {
) : (
-
-
- {requestIcon && (
-
- )}
- {requestName}
- {requestURL}
-
-
- From
-
-
-
-
-
- {transaction && (
-
-
-
-
- {network === 'eth' && (
-
+ <>
+
+
+ {requestIcon && (
+
)}
+ {requestName}
+ {requestURL}
- )}
+
+ From
+
+
+
+
+
+ {transaction && (
+
+
+
+
+ {network === 'eth' && (
+
+ )}
+
+ )}
+
-
+ >
)}
>
);
diff --git a/src/screens/SignRequest.tsx b/src/screens/SignRequest.tsx
index a109018..509deb6 100644
--- a/src/screens/SignRequest.tsx
+++ b/src/screens/SignRequest.tsx
@@ -221,38 +221,39 @@ const SignRequest = ({ route }: SignRequestProps) => {
) : (
-
-
- {requestIcon && (
- <>
- {requestIcon.endsWith('.svg') ? (
-
-
-
- ) : (
-
- )}
- >
- )}
- {requestName}
- {requestURL}
-
-
- {isCosmosSignDirect || isEthSendTransaction ? (
-
-
+ <>
+
+
+ {requestIcon && (
+ <>
+ {requestIcon.endsWith('.svg') ? (
+
+
+
+ ) : (
+
+ )}
+ >
+ )}
+ {requestName}
+ {requestURL}
+
+
+ {isCosmosSignDirect || isEthSendTransaction ? (
+
+
+ {message}
+
+
+ ) : (
+
{message}
-
-
- ) : (
-
- {message}
-
- )}
-
+
+ )}
+
-
+ >
)}
>
);
diff --git a/src/styles/stylesheet.js b/src/styles/stylesheet.js
index 6052bb6..eaf2084 100644
--- a/src/styles/stylesheet.js
+++ b/src/styles/stylesheet.js
@@ -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: {