1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

Ensure send logs use current chain currency symbol (#14726)

This commit is contained in:
Dan J Miller 2022-05-17 14:27:23 -02:30 committed by GitHub
parent ca6835a86d
commit 944c22262f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1466,6 +1466,7 @@ export function resetSendState() {
export function updateSendAmount(amount) {
return async (dispatch, getState) => {
const state = getState();
const { metamask } = state;
let logAmount = amount;
if (state[name].asset.type === ASSET_TYPES.TOKEN) {
const multiplier = Math.pow(
@ -1489,7 +1490,7 @@ export function updateSendAmount(amount) {
toCurrency: ETH,
numberOfDecimals: 8,
});
logAmount = `${ethValue} ${ETH}`;
logAmount = `${ethValue} ${metamask?.provider?.ticker || ETH}`;
}
await dispatch(
addHistoryEntry(`sendFlow - user set amount to ${logAmount}`),