1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-27 02:38:18 +00:00

Revert "remove token already used msg"

This reverts commit 68b7d41d93.
This commit is contained in:
Vladimir Volek 2019-04-26 14:57:50 +02:00
parent 2cd2d684db
commit 30adb2052c
3 changed files with 21 additions and 1 deletions

View File

@ -23,6 +23,10 @@ const definedMessages: Messages = defineMessages({
id: 'TR_TOKEN_NOT_FOUND',
defaultMessage: 'Token not found',
},
TR_ALREADY_USED: {
id: 'TR_ALREADY_USED',
defaultMessage: 'Already used',
},
TR_HISTORY: {
id: 'TR_HISTORY',
defaultMessage: 'History',

View File

@ -156,7 +156,15 @@ const AccountSummary = (props: Props) => {
}
}}
loadOptions={input => props.loadTokens(input, account.network)}
formatOptionLabel={option => option.name}
formatOptionLabel={option => {
const isAdded = tokens.find(t => t.symbol === option.symbol);
if (isAdded) {
return `${option.name} (${props.intl.formatMessage(
l10nSummaryMessages.TR_ALREADY_USED
)})`;
}
return option.name;
}}
getOptionLabel={option => option.name}
getOptionValue={option => option.symbol}
/>

View File

@ -1615,6 +1615,14 @@
]
}
},
"TR_ALREADY_USED": {
"source": "Already used",
"meta": {
"occurrences": [
"src/views/Wallet/views/Account/Summary/common.messages.js"
]
}
},
"TR_HISTORY": {
"source": "History",
"meta": {