mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-05 07:24:56 +01:00
42be5a07d7
* Replaced addresses by the address component on SignTypedData v4 signatures * Fixing signature-request e2e tests * Modified scss file for signature-request message * Using address component for rendering the addresses and bold label where hex address is not valid * Modify the address component * Added proper BEM syntax for class names and used Box and Typography * FIxing e2e tests * Commited requested changes from George and added storybook * Review requested changes * Created new component for rendering data in signature-request-message.js * Fixing proper usage for getAccountName and getMetadataContractName selectors * Fixing e2e tests
59 lines
1.5 KiB
JavaScript
59 lines
1.5 KiB
JavaScript
import React from 'react';
|
|
import SignatureRequestMessage from './signature-request-message';
|
|
|
|
export default {
|
|
title: 'Components/App/SignatureRequestMessage',
|
|
id: __filename,
|
|
component: SignatureRequestMessage,
|
|
argTypes: {
|
|
data: { control: 'object' },
|
|
onMessageScrolled: { action: 'onMessageScrolled' },
|
|
setMessageRootRef: { action: 'setMessageRootRef' },
|
|
messageRootRef: { control: 'object' },
|
|
messageIsScrollable: { control: 'boolean' },
|
|
},
|
|
};
|
|
|
|
export const DefaultStory = (args) => {
|
|
return <SignatureRequestMessage {...args} />;
|
|
};
|
|
|
|
DefaultStory.storyName = 'Default';
|
|
|
|
DefaultStory.args = {
|
|
data: JSON.parse(
|
|
JSON.stringify({
|
|
domain: {
|
|
name: 'happydapp.website',
|
|
},
|
|
message: {
|
|
string: 'haay wuurl',
|
|
number: 42,
|
|
},
|
|
primaryType: 'Mail',
|
|
types: {
|
|
EIP712Domain: [
|
|
{ name: 'name', type: 'string' },
|
|
{ name: 'version', type: 'string' },
|
|
{ name: 'chainId', type: 'uint256' },
|
|
{ name: 'verifyingContract', type: 'address' },
|
|
],
|
|
Group: [
|
|
{ name: 'name', type: 'string' },
|
|
{ name: 'members', type: 'Person[]' },
|
|
],
|
|
Mail: [
|
|
{ name: 'from', type: 'Person' },
|
|
{ name: 'to', type: 'Person[]' },
|
|
{ name: 'contents', type: 'string' },
|
|
],
|
|
Person: [
|
|
{ name: 'name', type: 'string' },
|
|
{ name: 'wallets', type: 'address[]' },
|
|
],
|
|
},
|
|
}),
|
|
),
|
|
messageIsScrollable: true,
|
|
};
|