mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
4855d1b423
The `getMessage` function in `i18n-helper` was assuming that any substitutions passed into the transaction function were used by the corresponding localized message. However, some messages are intentionally ignoring substitutions passed in. This was done to simplify the UI logic, so the same substitutions could be passed in for many different messages, even if some don't use them. For example, `transactionCancelSuccess` is passed two substitutions but only uses the second one. `transactionErrored` is passed in two, but uses neither. `getMessage` has been updated to no longer make that assumption. It will now only throw an error if the localized message expects a substitution that was not given. A given substitution that is unused results in no error. |
||
---|---|---|
.. | ||
components | ||
contexts | ||
css | ||
ducks | ||
helpers | ||
hooks | ||
pages | ||
selectors | ||
store |