1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 11:46:13 +02:00
metamask-extension/ui/components/app/signature-request
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
..
signature-request-footer Fix signature request propTypes (#12952) 2021-12-02 14:39:18 -03:30
signature-request-header Use ternary conditionals instead of && (#12406) 2021-10-21 11:11:31 -05:00
signature-request-message Using design system breakpoint values across ui/ 2021-09-11 11:00:46 -07:00
index.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
index.scss Using design system breakpoint values across ui/ 2021-09-11 11:00:46 -07:00
README.mdx Fix signature-request for new Storybook format (#12755) 2021-12-08 12:32:59 -08:00
signature-request.component.js "eth_signTypedData" presents fields that do not appear in 'types' filed (#12905) 2021-12-09 00:56:09 +04:00
signature-request.component.test.js "eth_signTypedData" presents fields that do not appear in 'types' filed (#12905) 2021-12-09 00:56:09 +04:00
signature-request.constants.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
signature-request.container.js Reject popup confirmations on close (#12643) 2021-11-15 17:13:51 +01:00
signature-request.container.test.js UX Papercuts Epic: Create a consistent representation of the Buttons (#12096) 2021-10-05 15:20:42 -04:00
signature-request.stories.js Fix signature-request for new Storybook format (#12755) 2021-12-08 12:32:59 -08:00

import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';

import SignatureRequest from '.';

# Signature Request

dApp requesting a signature from the user.

<Canvas>
  <Story id="ui-components-app-signature-request-signature-request-stories-js--default-story" />
</Canvas>

## Component API

<ArgsTable of={SignatureRequest} />