mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
27 lines
664 B
TypeScript
27 lines
664 B
TypeScript
import React from 'react';
|
|
|
|
import type { ExternalChain } from 'types/externalChains';
|
|
|
|
import config from 'configs/app';
|
|
|
|
import type { EntityProps as TxEntityProps } from './TxEntity';
|
|
import TxEntity from './TxEntity';
|
|
import TxEntityExternal from './TxEntityExternal';
|
|
|
|
interface Props extends TxEntityProps {
|
|
chain: ExternalChain | undefined;
|
|
}
|
|
|
|
const TxEntityInterchain = ({ chain, ...props }: Props) => {
|
|
|
|
const isCurrentChain = chain?.id === config.chain.id;
|
|
|
|
if (isCurrentChain) {
|
|
return <TxEntity { ...props } chain={ chain }/>;
|
|
}
|
|
|
|
return <TxEntityExternal { ...props } chain={ chain }/>;
|
|
};
|
|
|
|
export default React.memo(TxEntityInterchain);
|