A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ciphermask/ui/components/app/signature-request/signature-request.stories.js

78 lines
2.0 KiB

import React from 'react';
import testData from '../../../../.storybook/test-data';
import README from './README.mdx';
import SignatureRequest from './signature-request.component';
const [MOCK_PRIMARY_IDENTITY] = Object.values(testData.metamask.identities);
export default {
title: 'Components/App/SignatureRequest',
id: __filename,
component: SignatureRequest,
parameters: {
docs: {
page: README,
},
},
argTypes: {
txData: { control: 'object' },
fromAccount: {
table: {
address: { control: 'text' },
balance: { control: 'text' },
name: { control: 'text' },
},
},
hardwareWalletRequiresConnection: { control: 'boolean' },
isLedgerWallet: { control: 'boolean' },
clearConfirmTransaction: { action: 'Clean Confirm' },
cancel: { action: 'Cancel' },
sign: { action: 'Sign' },
},
};
export const DefaultStory = (args) => {
return <SignatureRequest {...args} />;
};
DefaultStory.storyName = 'Default';
DefaultStory.args = {
txData: {
msgParams: {
data: 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[]' },
],
},
}),
origin: 'https://happydapp.website/governance?futarchy=true',
},
},
fromAccount: MOCK_PRIMARY_IDENTITY,
};