(null)
const collapsedContainerMaxHeight = collapsedLinesNumber * lineHeight
useEffect(() => {
const checkOverflow = () => {
- if (textRef.current) {
- const isOverflow = textRef.current.scrollHeight > textRef.current.clientHeight
+ if (ref.current) {
+ const isOverflow = ref.current.scrollHeight > ref.current.clientHeight
setIsOverflowing(isOverflow)
}
}
@@ -52,15 +66,13 @@ export const LongDataDisplay: FC<{ data: string; fontWeight?: number; collapsedL
window.addEventListener('resize', handleResize)
return () => window.removeEventListener('resize', handleResize)
- }, [data])
+ }, [children])
return (
-
- {data}
-
+ {children}
+
{(isOverflowing || isExpanded) && (
setIsExpanded(!isExpanded)}>
{isExpanded ? t('common.hide') : t('common.show')}
diff --git a/src/app/pages/RuntimeTransactionDetailPage/index.tsx b/src/app/pages/RuntimeTransactionDetailPage/index.tsx
index b81aadc99..da63e0229 100644
--- a/src/app/pages/RuntimeTransactionDetailPage/index.tsx
+++ b/src/app/pages/RuntimeTransactionDetailPage/index.tsx
@@ -30,12 +30,13 @@ import { CurrentFiatValue } from '../../components/CurrentFiatValue'
import { AddressSwitch, AddressSwitchOption } from '../../components/AddressSwitch'
import { TransactionEncryptionStatus } from '../../components/TransactionEncryptionStatus'
import Typography from '@mui/material/Typography'
-import { LongDataDisplay } from '../../components/LongDataDisplay'
+import { LongDataDisplay, LongElementDisplay } from '../../components/LongDataDisplay'
import { getPreciseNumberFormat } from '../../../locales/getPreciseNumberFormat'
import { base64ToHex } from '../../utils/helpers'
import { DappBanner } from '../../components/DappBanner'
import { getFiatCurrencyForScope, showFiatValues } from '../../../config'
import { convertToNano, getGasPrice } from '../../utils/number-utils'
+import Box from '@mui/material/Box'
type TransactionSelectionResult = {
wantedTransaction?: RuntimeTransaction
@@ -226,7 +227,11 @@ export const RuntimeTransactionDetailView: FC<{
{t('common.type')}
-
+
+
+
+
+