1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/helpers/utils
Olusegun Akintayo a7da8333a0
"eth_signTypedData" presents fields that do not appear in 'types' filed (#12905)
* Premilimary Sanitize data logic.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* sanitizeData v2

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* sanitizeData: take 3

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Sanitize Data take 4

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Check that version is v4 before sanitizing.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* sanitize arrays.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Tests to check that typeless data are not shwon

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint Fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Do not check value types, Iterate through the message, and ensure each property of the message is declared as a type

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Check that if data type is not defined, it is a solidity type.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint Fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Code cleanup

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Move sanitizeData to utils
Tests for sanitizeData in utils

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix unit tests for signaturerequest

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove unused type
include fixedMxN and ufixedMxN checks.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* move fixtures to before each

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* invert if condition to avoid indentations.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* We should exclude types with [] at the beginning or middle as well:

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* cache nestedType

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Throw error for undefined/invalid types definition

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Throw if base type and types are not defined.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2021-12-09 00:56:09 +04:00
..
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 remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
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
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
hardware.js Create function for hardware keyring checking (#12457) 2021-10-27 18:54:18 -05:00
i18n-helper.js Fix isMainnet propType error (#12951) 2021-12-02 14:46:46 -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 adding checksum conversion (#12209) 2021-09-27 09:58:12 -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
storage-helpers.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
switch-direction.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
token-util.js Integrating the TokenListController to Extension (#11398) 2021-09-09 16:56:27 -04:00
transactions.util.js UX improvements to the "Permission Request" section on the approve screen (#12553) 2021-11-03 02:15:05 +04:00
transactions.util.test.js Support for type 0 transaction (#12252) 2021-10-06 23:59:57 +05:30
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 "eth_signTypedData" presents fields that do not appear in 'types' filed (#12905) 2021-12-09 00:56:09 +04: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