mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
37 lines
943 B
TypeScript
37 lines
943 B
TypeScript
import React from 'react';
|
|
|
|
import type { InternalTransaction } from 'types/api/internalTransaction';
|
|
|
|
import { useMultichainContext } from 'lib/contexts/multichain';
|
|
|
|
import InternalTxsListItem from './InternalTxsListItem';
|
|
|
|
type Props = {
|
|
data: Array<InternalTransaction>;
|
|
currentAddress?: string;
|
|
isLoading?: boolean;
|
|
showBlockInfo?: boolean;
|
|
};
|
|
|
|
const InternalTxsList = ({ data, currentAddress, isLoading, showBlockInfo = true }: Props) => {
|
|
const multichainContext = useMultichainContext();
|
|
const chainData = multichainContext?.chain;
|
|
|
|
return (
|
|
<div>
|
|
{ data.map((item, index) => (
|
|
<InternalTxsListItem
|
|
key={ item.transaction_hash + '_' + index }
|
|
{ ...item }
|
|
currentAddress={ currentAddress }
|
|
isLoading={ isLoading }
|
|
showBlockInfo={ showBlockInfo }
|
|
chainData={ chainData }
|
|
/>
|
|
)) }
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default InternalTxsList;
|