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

Add token standard to Token Added event. (#14253)

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

View File

@ -13,6 +13,7 @@ import ZENDESK_URLS from '../../helpers/constants/zendesk-url';
import { isEqualCaseInsensitive } from '../../../shared/modules/string-utils';
import { getSuggestedAssets } from '../../selectors';
import { rejectWatchAsset, acceptWatchAsset } from '../../store/actions';
import { TOKEN_STANDARDS } from '../../helpers/constants/common';
function getTokenName(name, symbol) {
return name === undefined ? symbol : `${name} (${symbol})`;
@ -120,6 +121,7 @@ const ConfirmAddSuggestedToken = () => {
token_decimal_precision: asset.decimals,
unlisted: asset.unlisted,
source: 'dapp',
token_standard: TOKEN_STANDARDS.ERC20,
},
});
}),

View File

@ -13,6 +13,7 @@ import { MetaMetricsContext as NewMetaMetricsContext } from '../../contexts/meta
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';
const getTokenName = (name, symbol) => {
return name === undefined ? symbol : `${name} (${symbol})`;
@ -43,6 +44,7 @@ const ConfirmImportToken = () => {
token_decimal_precision: pendingToken.decimals,
unlisted: pendingToken.unlisted,
source: pendingToken.isCustom ? 'custom' : 'list',
token_standard: TOKEN_STANDARDS.ERC20,
},
});
});