mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
36 lines
938 B
TypeScript
36 lines
938 B
TypeScript
import React from 'react';
|
|
|
|
import { CollapsibleList } from 'toolkit/chakra/collapsible';
|
|
import * as DetailedInfo from 'ui/shared/DetailedInfo/DetailedInfo';
|
|
import AddressEntity from 'ui/shared/entities/address/AddressEntity';
|
|
|
|
interface Props {
|
|
items: Array<string>;
|
|
}
|
|
|
|
const TxAllowedPeekers = ({ items }: Props) => {
|
|
const renderItem = React.useCallback((item: string) => {
|
|
return <AddressEntity key={ item } address={{ hash: item, is_contract: true }}/>;
|
|
}, []);
|
|
|
|
return (
|
|
<>
|
|
<DetailedInfo.ItemLabel
|
|
hint="Smart contracts allowed to interact with confidential data"
|
|
>
|
|
Allowed peekers
|
|
</DetailedInfo.ItemLabel>
|
|
<DetailedInfo.ItemValue>
|
|
<CollapsibleList
|
|
items={ items }
|
|
renderItem={ renderItem }
|
|
cutLength={ 2 }
|
|
rowGap={ 3 }
|
|
/>
|
|
</DetailedInfo.ItemValue>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default React.memo(TxAllowedPeekers);
|