diff --git a/.changelog/1695.bugfix.md b/.changelog/1695.bugfix.md new file mode 100644 index 000000000..248d1f5ff --- /dev/null +++ b/.changelog/1695.bugfix.md @@ -0,0 +1 @@ +Correctly display encryption data for oasis-style encrypted transactions diff --git a/src/app/components/Transactions/RuntimeTransactions.tsx b/src/app/components/Transactions/RuntimeTransactions.tsx index 96844be46..a3bd78572 100644 --- a/src/app/components/Transactions/RuntimeTransactions.tsx +++ b/src/app/components/Transactions/RuntimeTransactions.tsx @@ -82,7 +82,11 @@ export const RuntimeTransactions: FC = ({ ...(verbose && canHaveEncryption ? [ { - content: , + content: ( + + ), key: 'encrypted', }, ] diff --git a/src/app/pages/RuntimeTransactionDetailPage/index.tsx b/src/app/pages/RuntimeTransactionDetailPage/index.tsx index 5dbff666a..428229846 100644 --- a/src/app/pages/RuntimeTransactionDetailPage/index.tsx +++ b/src/app/pages/RuntimeTransactionDetailPage/index.tsx @@ -100,6 +100,7 @@ export const RuntimeTransactionDetailView: FC<{ // @ts-expect-error Ignore index type error const amountSymbolPriceInfo = tokenPrices[transaction?.amount_symbol] const gasPrice = getGasPrice({ fee: transaction?.charged_fee, gasUsed: transaction?.gas_used.toString() }) + const envelope = transaction?.encryption_envelope ?? transaction?.oasis_encryption_envelope return ( <> @@ -154,7 +155,7 @@ export const RuntimeTransactionDetailView: FC<{
{t('transactions.encryption.format')}
- +
{t('common.timestamp')}
@@ -259,7 +260,7 @@ export const RuntimeTransactionDetailView: FC<{ )} - {!transaction.encryption_envelope && transaction.body?.init_code && ( + {!envelope && transaction.body?.init_code && ( <>
{t('transaction.rawData')}
@@ -268,55 +269,55 @@ export const RuntimeTransactionDetailView: FC<{ )} - {transaction.encryption_envelope && ( + {envelope && ( <> - {transaction.encryption_envelope.public_key !== undefined && ( + {envelope.public_key !== undefined && ( <>
{t('transactions.encryption.publicKey')}
- {transaction.encryption_envelope.public_key} + {envelope.public_key}
)} - {transaction.encryption_envelope.data_nonce !== undefined && ( + {envelope.data_nonce !== undefined && ( <>
{t('transactions.encryption.dataNonce')}
- {transaction.encryption_envelope.data_nonce} + {envelope.data_nonce}
)} - {transaction.encryption_envelope.data !== undefined && ( + {envelope.data !== undefined && ( <>
{t('transactions.encryption.encryptedData')}
- +
)} - {transaction.encryption_envelope.result_nonce !== undefined && ( + {envelope.result_nonce !== undefined && ( <>
{t('transactions.encryption.resultNonce')}
- {transaction.encryption_envelope.result_nonce} + {envelope.result_nonce}
)} - {transaction.encryption_envelope.result !== undefined && ( + {envelope.result !== undefined && ( <>
{t('transactions.encryption.encryptedResult')}
- +
)}