1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Add asset_type to 'Tokens Added' event. (#14252)

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
This commit is contained in:
Olusegun Akintayo 2022-03-31 11:43:26 +04:00 committed by GitHub
parent 00025afe4c
commit 3c2e4e9c9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import { isEqualCaseInsensitive } from '../../../shared/modules/string-utils';
import { getSuggestedAssets } from '../../selectors';
import { rejectWatchAsset, acceptWatchAsset } from '../../store/actions';
import { TOKEN_STANDARDS } from '../../helpers/constants/common';
import { ASSET_TYPES } from '../../../shared/constants/transaction';
function getTokenName(name, symbol) {
return name === undefined ? symbol : `${name} (${symbol})`;
@ -122,6 +123,7 @@ const ConfirmAddSuggestedToken = () => {
unlisted: asset.unlisted,
source: 'dapp',
token_standard: TOKEN_STANDARDS.ERC20,
asset_type: ASSET_TYPES.TOKEN,
},
});
}),

View File

@ -14,6 +14,7 @@ import { getMostRecentOverviewPage } from '../../ducks/history/history';
import { getPendingTokens } from '../../ducks/metamask/metamask';
import { addTokens, clearPendingTokens } from '../../store/actions';
import { TOKEN_STANDARDS } from '../../helpers/constants/common';
import { ASSET_TYPES } from '../../../shared/constants/transaction';
const getTokenName = (name, symbol) => {
return name === undefined ? symbol : `${name} (${symbol})`;
@ -45,6 +46,7 @@ const ConfirmImportToken = () => {
unlisted: pendingToken.unlisted,
source: pendingToken.isCustom ? 'custom' : 'list',
token_standard: TOKEN_STANDARDS.ERC20,
asset_type: ASSET_TYPES.TOKEN,
},
});
});