mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Improve transaction complete popup (#16300)
* modified transaction complete popup deleted upperCase function deleted replaceAll fixed lint * resolved conflicts * modified view const Co-authored-by: Vladimir Saric <92527393+VSaric@users.noreply.github.com>
This commit is contained in:
parent
23653f4c08
commit
54cbc66120
@ -1,9 +1,11 @@
|
||||
import browser from 'webextension-polyfill';
|
||||
|
||||
import { getBlockExplorerLink } from '@metamask/etherscan-link';
|
||||
import { startCase, toLower } from 'lodash';
|
||||
import { getEnvironmentType } from '../lib/util';
|
||||
import { ENVIRONMENT_TYPE_BACKGROUND } from '../../../shared/constants/app';
|
||||
import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction';
|
||||
import { getURLHostName } from '../../../ui/helpers/utils/util';
|
||||
|
||||
export default class ExtensionPlatform {
|
||||
//
|
||||
@ -160,10 +162,13 @@ export default class ExtensionPlatform {
|
||||
|
||||
const url = getBlockExplorerLink(txMeta, rpcPrefs);
|
||||
const nonce = parseInt(txMeta.txParams.nonce, 16);
|
||||
const view = startCase(
|
||||
toLower(getURLHostName(url).replace(/([.]\w+)$/u, '')),
|
||||
);
|
||||
|
||||
const title = 'Confirmed transaction';
|
||||
const message = `Transaction ${nonce} confirmed! ${
|
||||
url.length ? 'View on Etherscan' : ''
|
||||
url.length ? `View on ${view}` : ''
|
||||
}`;
|
||||
this._showNotification(title, message, url);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user