diff --git a/.changelog/1705.trivial.md b/.changelog/1705.trivial.md new file mode 100644 index 000000000..6555d3954 --- /dev/null +++ b/.changelog/1705.trivial.md @@ -0,0 +1 @@ +Add support for displaying multiple signers of runtime transactions diff --git a/src/app/components/Account/ContractCreatorInfo.tsx b/src/app/components/Account/ContractCreatorInfo.tsx index fed858109..8815824b7 100644 --- a/src/app/components/Account/ContractCreatorInfo.tsx +++ b/src/app/components/Account/ContractCreatorInfo.tsx @@ -25,7 +25,8 @@ const TxSender: FC<{ scope: SearchScope; txHash: string; alwaysTrim?: boolean }> } const query = useGetRuntimeTransactionsTxHash(scope.network, scope.layer, txHash) const tx = query.data?.data.transactions[0] - const senderAddress = tx?.sender_0_eth || tx?.sender_0 + const senderAddress = + tx?.signers?.[0].address_eth ?? tx?.sender_0_eth ?? tx?.signers?.[0].address ?? tx?.sender_0 return query.isLoading ? ( = ({ {targetAddress && } diff --git a/src/app/pages/RuntimeTransactionDetailPage/index.tsx b/src/app/pages/RuntimeTransactionDetailPage/index.tsx index 428229846..1345fa72b 100644 --- a/src/app/pages/RuntimeTransactionDetailPage/index.tsx +++ b/src/app/pages/RuntimeTransactionDetailPage/index.tsx @@ -72,7 +72,13 @@ export const RuntimeTransactionDetailPage: FC = () => { tokenPrices={tokenPrices} /> - + {transaction?.signers ? ( + (transaction?.signers ?? []).map((signer, index) => ( + + )) + ) : ( + + )} {transaction && ( @@ -161,15 +167,35 @@ export const RuntimeTransactionDetailView: FC<{
{t('common.timestamp')}
{formattedTimestamp}
- {(transaction?.sender_0 || transaction?.sender_0_eth) && ( + {(!!transaction?.signers?.length || !!transaction?.sender_0_eth || !!transaction?.sender_0) && ( <>
{t('common.from')}
-
- - +
+ {transaction?.signers ? ( + (transaction?.signers ?? []).map((signer, index) => ( + <> + + +
+ + )) + ) : ( + <> + + + + )}
)}