Commit 4c79cd83 authored by POA's avatar POA

Partially fix lint:tsc errors

parent 1506dac0
......@@ -48,6 +48,7 @@ export type Transaction = (
method: string | null;
tx_types: Array<TransactionType>;
tx_tag: string | null;
actions?: Array<object>;
}
export type TransactionsResponse = TransactionsResponseValidated | TransactionsResponsePending;
......
export type TokenTransferPagination = {
export type TxAction = {
protocol: string;
type: string;
data: object;
......
......@@ -8,6 +8,8 @@ interface Props extends Omit<HTMLChakraProps<'div'>, 'title'> {
title: React.ReactNode;
hint: string;
children: React.ReactNode;
note?: string;
noteDisplay?: string;
}
const DetailsInfoItem = ({ title, hint, note, noteDisplay, children, id, ...styles }: Props) => {
......
......@@ -68,9 +68,9 @@ const TxDetailsAction = ({ protocol, type, data, isLast }: Props) => {
<Text as="span">Mint of</Text>
<Image src={ uniswapIconUrl } boxSize={ 5 } fallback=" " alt=""/>
<Link href={ tokenUrl } target="_blank" overflow="hidden" whiteSpace="nowrap">
<StringShorten title={ data.name } maxLength="12"/>
<StringShorten title={ data.name } maxLength={ 12 }/>
{ space }
(<StringShorten title={ data.symbol } maxLength="6"/>)
(<StringShorten title={ data.symbol } maxLength={ 6 }/>)
</Link>
</Flex>
<Flex columnGap={ 1 }>
......@@ -80,7 +80,7 @@ const TxDetailsAction = ({ protocol, type, data, isLast }: Props) => {
</Flex>
<Flex columnGap={ 1 } rowGap={ 2 } marginLeft={ 3 } flexDirection="column">
{
data.ids.map((id) => {
data.ids.map((id: string) => {
const url = link('token_instance_item', { hash: data.address, id });
return (
<Flex key={ id }>
......
......@@ -6,7 +6,11 @@ import DetailsInfoItem from 'ui/shared/DetailsInfoItem';
import TxDetailsAction from './TxDetailsAction';
const TxDetailsActions = ({ actions }: array) => {
interface Props {
actions: array;
}
const TxDetailsActions = ({ actions }: Props) => {
function onScrollbarLoad() {
$('.mCustomScrollbar').mCustomScrollbar({ callbacks: {
onOverflowY: () => {
......@@ -41,7 +45,7 @@ const TxDetailsActions = ({ actions }: array) => {
w="100%"
fontWeight={ 500 }
>
{ actions.map((action, index) => <TxDetailsAction key={ index } { ...action } isLast={ index === actions.length - 1 }/>) }
{ actions.map((action, index: number) => <TxDetailsAction key={ index } { ...action } isLast={ index === actions.length - 1 }/>) }
</Flex>
</Box>
{ /* eslint-disable-next-line react/jsx-no-bind */ }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment