1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-01 21:57:06 +01:00
metamask-extension/ui/helpers/utils
Dan J Miller c63714c4f2 Show users a warning when they are sending directly to a token contract (#13588)
* Fix warning dialog when sending tokens to a known token contract address

Fixing after rebase

Covering missed cases

Rebased and ran yarn setup

Rebased

Fix checkContractAddress condition

Lint fix

Applied requested changes

Fix unit tests

Applying requested changes

Applied requested changes

Refactor and update

Lint fix

Use V2 of ActionableMessage component

Adding Learn More Link

Updating warning copy

Addressing review feedback

Fix up copy changes

Simplify validation of pasted addresses

Improve detection of whether this is a token contract

Refactor to leave updateRecipient unchanged, and to prevent the double calling of update recipient

Update tests

fix

* Fix unit tests

* Fix e2e tests

* Ensure next button is disabled while recipient type is loading

* Add optional chaining and a fallback to getRecipientWarningAcknowledgement

* Fix lint

* Don't reset recipient warning on asset change, because we should show recipient warnings regardless of asset

* Update unit tests

* Update unit tests

Co-authored-by: Filip Sekulic <filip.sekulic@consensys.net>
2022-07-13 19:46:30 -02:30
..
optimism ci - enforce yarn lock deduplications (#12737) 2021-11-23 09:17:27 -10:00
build-types.js Add platform-specific build type manifest modifications (#12638) 2021-11-10 19:33:59 -03:30
common.util.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
common.util.test.js Update ESLint config to v8 (#12886) 2021-12-09 15:36:24 -03:30
confirm-tx.util.js Only show dapp suggested gas fee warning if user has not edited the fee (#11621) 2021-07-27 20:01:53 -02:30
confirm-tx.util.test.js Add gas constants (#11248) 2021-06-08 10:25:48 -05:00
conversions.util.js Fixes updates on the confirm screen. (#11788) 2021-08-06 14:31:30 -05:00
conversions.util.test.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
error-utils.js Add friendly error handling when background throws an error before listening for connection (#14461) 2022-06-08 00:37:15 +04:00
error-utils.test.js Add friendly error handling when background throws an error before listening for connection (#14461) 2022-06-08 00:37:15 +04:00
fetch-with-cache.js Using values from shared/constants/time to represent timing values (#11241) 2021-06-10 12:27:03 -07:00
fetch-with-cache.test.js bump @metamask/controllers to v15.0.2 and remove AbortController workaround in e2e tests (#11988) 2021-09-03 09:34:21 -05:00
formatters.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
gas.js Fix speed-up/cancel: don't update existing transaction data (#14355) 2022-04-14 13:20:48 -02:30
gas.test.js Degrade gracefully when gas API is down (#13865) 2022-03-11 11:59:58 -07:00
hardware.js Create function for hardware keyring checking (#12457) 2021-10-27 18:54:18 -05:00
i18n-helper.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
i18n-helper.test.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
icon-factory.js Update token detection logic to only control auto-detection (#14251) 2022-04-06 13:59:16 -04:00
is-mobile-view.js Using design system breakpoint values across ui/ 2021-09-11 11:00:46 -07:00
metric.test.js Adding the AdvancedGasFeePopover template (#12780) 2021-11-23 23:16:33 +05:30
metrics.js Adding the AdvancedGasFeePopover template (#12780) 2021-11-23 23:16:33 +05:30
permission.js snaps-skunkworks@0.14.0 (#14700) 2022-05-18 13:49:26 +02:00
settings-search.js Add snaps view search (#14419) 2022-04-19 11:08:09 -04:00
settings-search.test.js Adding popular custom network integration (#14557) 2022-06-30 13:49:07 -02:30
storage-helpers.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
switch-direction.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
token-util.js Show users a warning when they are sending directly to a token contract (#13588) 2022-07-13 19:46:30 -02:30
transactions.util.js Add setApprovalForAll confirmation view (#15010) 2022-07-11 22:02:56 -02:30
transactions.util.test.js Increase likelyhood of valid method signatures being returned by getMethodData (#14937) 2022-06-17 23:11:09 +02:00
tx-helper.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
tx-helper.test.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
util.js Degrade gracefully when gas API is down (#13865) 2022-03-11 11:59:58 -07:00
util.test.js "eth_signTypedData" presents fields that do not appear in 'types' filed (#12905) 2021-12-09 00:56:09 +04:00
webcam-utils.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00