import React from 'react'; import translate from 'translations'; import { decodeTransaction } from 'libs/transaction'; import EthTx from 'ethereumjs-tx'; import Code from 'components/ui/Code'; export interface Props { signedTx: string; } export const TxCompare = (props: Props) => { if (!props.signedTx) { return null; } const rawTx = decodeTransaction(new EthTx(props.signedTx), false); const Left = () => (

{translate('SEND_raw')}

{JSON.stringify(rawTx, null, 2)}
); const Right = () => (

{translate('SEND_signed')}

{props.signedTx}
); return (
); }; export type TTxCompare = typeof TxCompare;