mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
42 lines
1.0 KiB
TypeScript
42 lines
1.0 KiB
TypeScript
import React from 'react';
|
|
|
|
import type { ChainInfo } from 'types/api/interop';
|
|
|
|
import type { EntityProps } from 'ui/shared/entities/tx/TxEntity';
|
|
import TxEntity from 'ui/shared/entities/tx/TxEntity';
|
|
import TxEntityInterop from 'ui/shared/entities/tx/TxEntityInterop';
|
|
|
|
type Props = {
|
|
init_transaction_hash?: string | null;
|
|
init_chain?: ChainInfo | null;
|
|
isLoading?: boolean;
|
|
truncation?: EntityProps['truncation'];
|
|
};
|
|
const InteropMessageSourceTx = (props: Props) => {
|
|
if (props.init_chain !== undefined) {
|
|
return (
|
|
<TxEntityInterop
|
|
chain={ props.init_chain }
|
|
hash={ props.init_transaction_hash }
|
|
isLoading={ props.isLoading }
|
|
truncation={ props.truncation || 'constant' }
|
|
/>
|
|
);
|
|
}
|
|
|
|
if (!props.init_transaction_hash) {
|
|
return 'N/A';
|
|
}
|
|
|
|
return (
|
|
<TxEntity
|
|
hash={ props.init_transaction_hash }
|
|
isLoading={ props.isLoading }
|
|
noIcon
|
|
truncation={ props.truncation || 'constant' }
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default InteropMessageSourceTx;
|