mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
Group signature transactions (#11016)
This commit is contained in:
parent
3dc3d4d651
commit
761288b18f
@ -1,3 +1,5 @@
|
|||||||
|
import { MESSAGE_TYPE } from './app';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transaction Type is a MetaMask construct used internally
|
* Transaction Type is a MetaMask construct used internally
|
||||||
* @typedef {Object} TransactionTypes
|
* @typedef {Object} TransactionTypes
|
||||||
@ -51,6 +53,11 @@ export const TRANSACTION_TYPES = {
|
|||||||
DEPLOY_CONTRACT: 'contractDeployment',
|
DEPLOY_CONTRACT: 'contractDeployment',
|
||||||
SWAP: 'swap',
|
SWAP: 'swap',
|
||||||
SWAP_APPROVAL: 'swapApproval',
|
SWAP_APPROVAL: 'swapApproval',
|
||||||
|
SIGN: MESSAGE_TYPE.ETH_SIGN,
|
||||||
|
SIGN_TYPED_DATA: MESSAGE_TYPE.ETH_SIGN_TYPED_DATA,
|
||||||
|
PERSONAL_SIGN: MESSAGE_TYPE.PERSONAL_SIGN,
|
||||||
|
ETH_DECRYPT: MESSAGE_TYPE.ETH_DECRYPT,
|
||||||
|
ETH_GET_ENCRYPTION_PUBLIC_KEY: MESSAGE_TYPE.ETH_GET_ENCRYPTION_PUBLIC_KEY,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -145,7 +145,17 @@ export function useTransactionDisplayData(transactionGroup) {
|
|||||||
// 6. Swap
|
// 6. Swap
|
||||||
// 7. Swap Approval
|
// 7. Swap Approval
|
||||||
|
|
||||||
if (type === null || type === undefined) {
|
const signatureTypes = [
|
||||||
|
null,
|
||||||
|
undefined,
|
||||||
|
TRANSACTION_TYPES.SIGN,
|
||||||
|
TRANSACTION_TYPES.PERSONAL_SIGN,
|
||||||
|
TRANSACTION_TYPES.SIGN_TYPED_DATA,
|
||||||
|
TRANSACTION_TYPES.ETH_DECRYPT,
|
||||||
|
TRANSACTION_TYPES.ETH_GET_ENCRYPTION_PUBLIC_KEY,
|
||||||
|
];
|
||||||
|
|
||||||
|
if (signatureTypes.includes(type)) {
|
||||||
category = TRANSACTION_GROUP_CATEGORIES.SIGNATURE_REQUEST;
|
category = TRANSACTION_GROUP_CATEGORIES.SIGNATURE_REQUEST;
|
||||||
title = t('signatureRequest');
|
title = t('signatureRequest');
|
||||||
subtitle = origin;
|
subtitle = origin;
|
||||||
|
Loading…
Reference in New Issue
Block a user