Skip to content

Commit

Permalink
Display TX format for unencrypted transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag committed Oct 31, 2023
1 parent e08e51d commit 7580b1f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions .changelog/898.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Display TX format for unencrypted transactions
20 changes: 14 additions & 6 deletions src/app/pages/TransactionDetailPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { CurrentFiatValue } from './CurrentFiatValue'
import { AddressSwitch, AddressSwitchOption } from '../../components/AddressSwitch'
import InfoIcon from '@mui/icons-material/Info'
import Tooltip from '@mui/material/Tooltip'
import { TransactionEncrypted } from '../../components/TransactionEncryptionStatus'
import { TransactionEncrypted, TransactionNotEncrypted } from '../../components/TransactionEncryptionStatus'
import Typography from '@mui/material/Typography'
import { LongDataDisplay } from '../../components/LongDataDisplay'
import { getPreciseNumberFormat } from '../../../locales/getPreciseNumberFormat'
Expand Down Expand Up @@ -245,6 +245,19 @@ export const TransactionDetailView: FC<{
<RuntimeTransactionLabel method={transaction.method} />
</dd>

<dt>{t('transactions.encryption.format')}</dt>
<dd>
{transaction.encryption_envelope ? (
<>
{transaction.encryption_envelope.format} &nbsp; <TransactionEncrypted />
</>
) : (
<>
{t('transactions.encryption.plain')} &nbsp; <TransactionNotEncrypted />
</>
)}
</dd>

<dt>{t('common.timestamp')}</dt>
<dd>{formattedTimestamp}</dd>

Expand Down Expand Up @@ -347,11 +360,6 @@ export const TransactionDetailView: FC<{

{transaction.encryption_envelope && (
<>
<dt>{t('transactions.encryption.format')}</dt>
<dd>
{transaction.encryption_envelope.format} &nbsp; <TransactionEncrypted />
</dd>

{transaction.encryption_envelope.public_key !== undefined && (
<>
<dt>{t('transactions.encryption.publicKey')}</dt>
Expand Down
1 change: 1 addition & 0 deletions src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
"encryptedData": "Data (encrypted)",
"encryptedResult": "Result (encrypted)",
"format": "Format",
"plain": "Plain",
"publicKey": "Public Key",
"resultNonce": "Result Nonce"
},
Expand Down

0 comments on commit 7580b1f

Please sign in to comment.