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:
parent
00025afe4c
commit
3c2e4e9c9e
@ -14,6 +14,7 @@ import { isEqualCaseInsensitive } from '../../../shared/modules/string-utils';
|
|||||||
import { getSuggestedAssets } from '../../selectors';
|
import { getSuggestedAssets } from '../../selectors';
|
||||||
import { rejectWatchAsset, acceptWatchAsset } from '../../store/actions';
|
import { rejectWatchAsset, acceptWatchAsset } from '../../store/actions';
|
||||||
import { TOKEN_STANDARDS } from '../../helpers/constants/common';
|
import { TOKEN_STANDARDS } from '../../helpers/constants/common';
|
||||||
|
import { ASSET_TYPES } from '../../../shared/constants/transaction';
|
||||||
|
|
||||||
function getTokenName(name, symbol) {
|
function getTokenName(name, symbol) {
|
||||||
return name === undefined ? symbol : `${name} (${symbol})`;
|
return name === undefined ? symbol : `${name} (${symbol})`;
|
||||||
@ -122,6 +123,7 @@ const ConfirmAddSuggestedToken = () => {
|
|||||||
unlisted: asset.unlisted,
|
unlisted: asset.unlisted,
|
||||||
source: 'dapp',
|
source: 'dapp',
|
||||||
token_standard: TOKEN_STANDARDS.ERC20,
|
token_standard: TOKEN_STANDARDS.ERC20,
|
||||||
|
asset_type: ASSET_TYPES.TOKEN,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
@ -14,6 +14,7 @@ import { getMostRecentOverviewPage } from '../../ducks/history/history';
|
|||||||
import { getPendingTokens } from '../../ducks/metamask/metamask';
|
import { getPendingTokens } from '../../ducks/metamask/metamask';
|
||||||
import { addTokens, clearPendingTokens } from '../../store/actions';
|
import { addTokens, clearPendingTokens } from '../../store/actions';
|
||||||
import { TOKEN_STANDARDS } from '../../helpers/constants/common';
|
import { TOKEN_STANDARDS } from '../../helpers/constants/common';
|
||||||
|
import { ASSET_TYPES } from '../../../shared/constants/transaction';
|
||||||
|
|
||||||
const getTokenName = (name, symbol) => {
|
const getTokenName = (name, symbol) => {
|
||||||
return name === undefined ? symbol : `${name} (${symbol})`;
|
return name === undefined ? symbol : `${name} (${symbol})`;
|
||||||
@ -45,6 +46,7 @@ const ConfirmImportToken = () => {
|
|||||||
unlisted: pendingToken.unlisted,
|
unlisted: pendingToken.unlisted,
|
||||||
source: pendingToken.isCustom ? 'custom' : 'list',
|
source: pendingToken.isCustom ? 'custom' : 'list',
|
||||||
token_standard: TOKEN_STANDARDS.ERC20,
|
token_standard: TOKEN_STANDARDS.ERC20,
|
||||||
|
asset_type: ASSET_TYPES.TOKEN,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user