diff --git a/packages/app-extension/src/components/Unlocked/Approvals/ApproveTransaction.tsx b/packages/app-extension/src/components/Unlocked/Approvals/ApproveTransaction.tsx index 4d6a92760..a6f64e2ec 100644 --- a/packages/app-extension/src/components/Unlocked/Approvals/ApproveTransaction.tsx +++ b/packages/app-extension/src/components/Unlocked/Approvals/ApproveTransaction.tsx @@ -29,6 +29,14 @@ const useStyles = makeStyles((theme) => ({ marginTop: "16px", textAlign: "center", }, + advancedDetailsLabel: { + textAlign: "center", + color: theme.custom.colors.secondary, + fontSize: "12px", + marginTop: "6px", + marginBottom: "8px", + cursor: "pointer", + }, listDescription: { color: theme.custom.colors.secondary, fontSize: "14px", @@ -181,6 +189,7 @@ export function ApproveAllTransactions({ ); const _isKeyCold = useRecoilValue(isKeyCold(wallet)); const [loading, setLoading] = useState(true); + const [showAll, setShowAll] = useState(false); const [consolidated, setConsolidated] = useState( null ); @@ -226,6 +235,10 @@ export function ApproveAllTransactions({ onCompletion(false); }; + const onToggleAdvanced = () => { + setShowAll((val) => !val); + }; + if (_isKeyCold) { return ; } @@ -246,43 +259,52 @@ export function ApproveAllTransactions({
- - Transaction Aggregate Details ({transactionsData.length}) - - -
- )} - {/* {transactionsData.map((tx, i) => - loading ? ( - - ) : (
- Transaction details #{i + 1} + Transaction Aggregate Details ({transactionsData.length})
- ) - )} */} + {showAll ? transactionsData.map((tx, i) => ( +
+ + [{i + 1}] Transaction details + + +
+ )) : null} + + )} + + {showAll ? "Hide Advanced Details" : "View Advanced Details"} + ); }