[FLASK] Allow snaps insights to show on regular EOA transactions (#16093)

feature/default_network_editable
Guillaume Roux 2 years ago committed by GitHub
parent 29a33b4692
commit cf265ed7ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js
  2. 12
      ui/pages/confirm-transaction-base/confirm-transaction-base.component.js

@ -102,9 +102,11 @@ export default class ConfirmPageContainerContent extends Component {
>
{detailsComponent}
</Tab>
<Tab className="confirm-page-container-content__tab" name={t('data')}>
{dataComponent}
</Tab>
{dataComponent && (
<Tab className="confirm-page-container-content__tab" name={t('data')}>
{dataComponent}
</Tab>
)}
{dataHexComponent && (
<Tab
className="confirm-page-container-content__tab"

@ -764,13 +764,17 @@ export default class ConfirmTransactionBase extends Component {
({ id }) => id === selectedInsightSnapId,
);
const allowedTransactionTypes =
txData.type === TRANSACTION_TYPES.CONTRACT_INTERACTION ||
txData.type === TRANSACTION_TYPES.SIMPLE_SEND ||
txData.type === TRANSACTION_TYPES.TOKEN_METHOD_SAFE_TRANSFER_FROM ||
txData.type === TRANSACTION_TYPES.TOKEN_METHOD_TRANSFER_FROM ||
txData.type === TRANSACTION_TYPES.TOKEN_METHOD_TRANSFER;
const networkId = CHAIN_ID_TO_NETWORK_ID_MAP[chainId];
const caip2ChainId = `eip155:${networkId ?? stripHexPrefix(chainId)}`;
if (
txData.type !== TRANSACTION_TYPES.CONTRACT_INTERACTION ||
!insightSnaps.length
) {
if (!allowedTransactionTypes || !insightSnaps.length) {
return null;
}

Loading…
Cancel
Save