mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
[FLASK] Allow snaps insights to show on regular EOA transactions (#16093)
This commit is contained in:
parent
29a33b4692
commit
cf265ed7ef
@ -102,9 +102,11 @@ export default class ConfirmPageContainerContent extends Component {
|
|||||||
>
|
>
|
||||||
{detailsComponent}
|
{detailsComponent}
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab className="confirm-page-container-content__tab" name={t('data')}>
|
{dataComponent && (
|
||||||
{dataComponent}
|
<Tab className="confirm-page-container-content__tab" name={t('data')}>
|
||||||
</Tab>
|
{dataComponent}
|
||||||
|
</Tab>
|
||||||
|
)}
|
||||||
{dataHexComponent && (
|
{dataHexComponent && (
|
||||||
<Tab
|
<Tab
|
||||||
className="confirm-page-container-content__tab"
|
className="confirm-page-container-content__tab"
|
||||||
|
@ -764,13 +764,17 @@ export default class ConfirmTransactionBase extends Component {
|
|||||||
({ id }) => id === selectedInsightSnapId,
|
({ 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 networkId = CHAIN_ID_TO_NETWORK_ID_MAP[chainId];
|
||||||
const caip2ChainId = `eip155:${networkId ?? stripHexPrefix(chainId)}`;
|
const caip2ChainId = `eip155:${networkId ?? stripHexPrefix(chainId)}`;
|
||||||
|
|
||||||
if (
|
if (!allowedTransactionTypes || !insightSnaps.length) {
|
||||||
txData.type !== TRANSACTION_TYPES.CONTRACT_INTERACTION ||
|
|
||||||
!insightSnaps.length
|
|
||||||
) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user