@@ -2,7 +2,6 @@ import { EvmEventParam, RuntimeEvent, RuntimeEventType } from '../../../oasis-ne
22import { FC , useEffect , useState } from 'react'
33import { useTranslation } from 'react-i18next'
44import { StyledDescriptionList } from '../StyledDescriptionList'
5- import Divider from '@mui/material/Divider'
65import { useScreenSize } from '../../hooks/useScreensize'
76import Table from '@mui/material/Table'
87import TableHead from '@mui/material/TableHead'
@@ -19,9 +18,9 @@ import { LongDataDisplay } from '../LongDataDisplay'
1918import { parseEvmEvent } from '../../utils/parseEvmEvent'
2019import { TokenTransferIcon , TokenTransferLabel } from '../Tokens/TokenTransferIcon'
2120import Box from '@mui/material/Box'
22- import { TransferIcon } from './. ./CustomIcons/Transfer'
23- import { DepositIcon } from './. ./CustomIcons/Deposit'
24- import { WithdrawIcon } from './. ./CustomIcons/Withdraw'
21+ import { TransferIcon } from '../CustomIcons/Transfer'
22+ import { DepositIcon } from '../CustomIcons/Deposit'
23+ import { WithdrawIcon } from '../CustomIcons/Withdraw'
2524import { COLORS } from '../../../styles/theme/colors'
2625import StreamIcon from '@mui/icons-material/Stream'
2726import LocalFireDepartmentIcon from '@mui/icons-material/LocalFireDepartment'
@@ -125,21 +124,21 @@ const EvmLogRow: FC<{
125124 )
126125}
127126
128- const LogEvent : FC < {
127+ export const RuntimeEventDetails : FC < {
129128 scope : SearchScope
130129 event : RuntimeEvent
131130 addressSwitchOption : AddressSwitchOption
132131} > = ( { scope, event, addressSwitchOption } ) => {
133132 const { isMobile } = useScreenSize ( )
134133 const { t } = useTranslation ( )
135134 const eventTypeNames : Record < RuntimeEventType , string > = {
136- [ RuntimeEventType . accountstransfer ] : t ( 'transactionEvent .accountstransfer' ) ,
137- [ RuntimeEventType . evmlog ] : t ( 'transactionEvent .evmLog' ) ,
138- [ RuntimeEventType . coregas_used ] : t ( 'transactionEvent .gasUsed' ) ,
139- [ RuntimeEventType . consensus_accountswithdraw ] : t ( 'transactionEvent .consensusWithdrawal' ) ,
140- [ RuntimeEventType . consensus_accountsdeposit ] : t ( 'transactionEvent .consensusDeposit' ) ,
141- [ RuntimeEventType . accountsmint ] : t ( 'transactionEvent .accountsmint' ) ,
142- [ RuntimeEventType . accountsburn ] : t ( 'transactionEvent .accountsburn' ) ,
135+ [ RuntimeEventType . accountstransfer ] : t ( 'runtimeEvent .accountstransfer' ) ,
136+ [ RuntimeEventType . evmlog ] : t ( 'runtimeEvent .evmLog' ) ,
137+ [ RuntimeEventType . coregas_used ] : t ( 'runtimeEvent .gasUsed' ) ,
138+ [ RuntimeEventType . consensus_accountswithdraw ] : t ( 'runtimeEvent .consensusWithdrawal' ) ,
139+ [ RuntimeEventType . consensus_accountsdeposit ] : t ( 'runtimeEvent .consensusDeposit' ) ,
140+ [ RuntimeEventType . accountsmint ] : t ( 'runtimeEvent .accountsmint' ) ,
141+ [ RuntimeEventType . accountsburn ] : t ( 'runtimeEvent .accountsburn' ) ,
143142 }
144143 const eventName = eventTypeNames [ event . type ]
145144 switch ( event . type ) {
@@ -207,7 +206,7 @@ const LogEvent: FC<{
207206 < div >
208207 < EventTypeIcon eventType = { event . type } eventName = { eventName } />
209208 < StyledDescriptionList titleWidth = { isMobile ? '100px' : '200px' } >
210- < dt > { t ( 'transactionEvent .fields.owner' ) } </ dt >
209+ < dt > { t ( 'runtimeEvent .fields.owner' ) } </ dt >
211210 < dd >
212211 < AccountLink
213212 address = { event . body . owner }
@@ -218,7 +217,7 @@ const LogEvent: FC<{
218217 < CopyToClipboard value = { event . body . owner } />
219218 ) }
220219 </ dd >
221- < dt > { t ( 'transactionEvent .fields.amount' ) } </ dt >
220+ < dt > { t ( 'runtimeEvent .fields.amount' ) } </ dt >
222221 < dd >
223222 { t ( 'common.valueInToken' , {
224223 ...getPreciseNumberFormat ( event . body . amount . Amount ) ,
@@ -255,7 +254,7 @@ const LogEvent: FC<{
255254 />
256255 { addressSwitchOption === AddressSwitchOption . Oasis && < CopyToClipboard value = { event . body . to } /> }
257256 </ dd >
258- < dt > { t ( 'transactionEvent .fields.amount' ) } </ dt >
257+ < dt > { t ( 'runtimeEvent .fields.amount' ) } </ dt >
259258 < dd >
260259 { t ( 'common.valueInToken' , {
261260 ...getPreciseNumberFormat ( event . body . amount . Amount ) ,
@@ -276,17 +275,3 @@ const LogEvent: FC<{
276275 )
277276 }
278277}
279-
280- export const TransactionLogEvent : FC < {
281- scope : SearchScope
282- event : RuntimeEvent
283- isFirst : boolean
284- addressSwitchOption : AddressSwitchOption
285- } > = ( { scope, event, isFirst, addressSwitchOption } ) => {
286- return (
287- < >
288- { ! isFirst && < Divider variant = "card" /> }
289- < LogEvent scope = { scope } event = { event } addressSwitchOption = { addressSwitchOption } />
290- </ >
291- )
292- }
0 commit comments