mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
29 lines
888 B
TypeScript
29 lines
888 B
TypeScript
import React from 'react';
|
|
|
|
import type { TxAction } from 'types/api/txAction';
|
|
|
|
import config from 'configs/app';
|
|
import TxDetailsActionsInterpretation from 'ui/tx/details/txDetailsActions/TxDetailsActionsInterpretation';
|
|
import TxDetailsActionsRaw from 'ui/tx/details/txDetailsActions/TxDetailsActionsRaw';
|
|
|
|
type Props = {
|
|
isTxDataLoading: boolean;
|
|
actions?: Array<TxAction>;
|
|
hash?: string;
|
|
};
|
|
|
|
const TxDetailsActions = ({ isTxDataLoading, actions, hash }: Props) => {
|
|
if (config.features.txInterpretation.isEnabled) {
|
|
return <TxDetailsActionsInterpretation hash={ hash } isTxDataLoading={ isTxDataLoading }/>;
|
|
}
|
|
|
|
/* if tx interpretation is not configured, show tx actions from tx info */
|
|
if (actions && actions.length > 0) {
|
|
return <TxDetailsActionsRaw actions={ actions } isLoading={ isTxDataLoading }/>;
|
|
}
|
|
|
|
return null;
|
|
};
|
|
|
|
export default TxDetailsActions;
|