mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* default TxEntity.noCopy to false remove redundant noCopy=false restore noCopy for tx hashes in this components This commit has no essential change, order than defaulting noCopy for TxEntity to false, and reversing the use of the prop * To reflect new default of TxEntity and UserOpEntity Updated tests to with-no-copy from with-copy remove outdated screenshots Regenerate screenshot for new default * display copy button for tx hash In the following pages: /txs, /internal-txs /token-transfers /address/txs, /address/token-transfers(tab) /deposits, /withdrawals /batches[id]/txs(tab) /advanced-filter * update snapshots * update snapshots
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import React from 'react';
|
|
|
|
import type { ChainInfo } from 'types/api/interop';
|
|
|
|
import TxEntity from 'ui/shared/entities/tx/TxEntity';
|
|
import type { EntityProps } from 'ui/shared/entities/tx/TxEntity';
|
|
import TxEntityInterop from 'ui/shared/entities/tx/TxEntityInterop';
|
|
|
|
type Props = {
|
|
relay_transaction_hash?: string | null;
|
|
relay_chain?: ChainInfo | null;
|
|
truncation?: EntityProps['truncation'];
|
|
isLoading?: boolean;
|
|
};
|
|
|
|
const InteropMessageDestinationTx = (props: Props) => {
|
|
if (props.relay_chain !== undefined) {
|
|
return (
|
|
<TxEntityInterop
|
|
chain={ props.relay_chain }
|
|
hash={ props.relay_transaction_hash }
|
|
isLoading={ props.isLoading }
|
|
truncation={ props.truncation || 'constant' }
|
|
noCopy
|
|
/>
|
|
);
|
|
}
|
|
|
|
if (!props.relay_transaction_hash) {
|
|
return 'N/A';
|
|
}
|
|
|
|
return (
|
|
<TxEntity
|
|
hash={ props.relay_transaction_hash }
|
|
isLoading={ props.isLoading }
|
|
noIcon
|
|
truncation={ props.truncation || 'constant' }
|
|
noCopy
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default InteropMessageDestinationTx;
|