2021-02-08 17:49:49 +01:00
|
|
|
import React from 'react';
|
2021-04-28 21:53:59 +02:00
|
|
|
import testData from '../../../../.storybook/test-data';
|
2021-12-08 21:32:59 +01:00
|
|
|
import README from './README.mdx';
|
2021-02-08 17:49:49 +01:00
|
|
|
import SignatureRequest from './signature-request.component';
|
|
|
|
|
|
|
|
const primaryIdentity = Object.values(testData.metamask.identities)[0];
|
|
|
|
|
|
|
|
export default {
|
2021-12-01 20:27:57 +01:00
|
|
|
title: 'Components/App/SignatureRequest',
|
2021-09-15 20:55:48 +02:00
|
|
|
id: __filename,
|
2021-12-08 21:32:59 +01:00
|
|
|
component: SignatureRequest,
|
|
|
|
parameters: {
|
|
|
|
docs: {
|
|
|
|
page: README,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
argTypes: {
|
|
|
|
txData: { control: 'object' },
|
|
|
|
fromAccount: {
|
|
|
|
table: {
|
|
|
|
address: { control: 'text' },
|
|
|
|
balance: { control: 'text' },
|
|
|
|
name: { control: 'text' },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
isLedgerWallet: { control: 'boolean' },
|
|
|
|
clearConfirmTransaction: { action: 'Clean Confirm' },
|
|
|
|
cancel: { action: 'Cancel' },
|
|
|
|
sign: { action: 'Sign' },
|
|
|
|
hardwareWalletRequiresConnection: {
|
|
|
|
action: 'hardwareWalletRequiresConnection',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const DefaultStory = (args) => {
|
|
|
|
return <SignatureRequest {...args} />;
|
2021-02-08 17:49:49 +01:00
|
|
|
};
|
|
|
|
|
2021-12-08 21:32:59 +01:00
|
|
|
DefaultStory.storyName = 'Default';
|
|
|
|
|
|
|
|
DefaultStory.args = {
|
|
|
|
txData: {
|
|
|
|
msgParams: {
|
|
|
|
data: JSON.stringify({
|
|
|
|
domain: {
|
|
|
|
name: 'happydapp.website',
|
|
|
|
},
|
|
|
|
message: {
|
|
|
|
string: 'haay wuurl',
|
|
|
|
number: 42,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
origin: 'https://happydapp.website/governance?futarchy=true',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
fromAccount: primaryIdentity,
|
2021-02-08 17:49:49 +01:00
|
|
|
};
|
2021-12-01 20:27:57 +01:00
|
|
|
|
|
|
|
DefaultStory.storyName = 'Default';
|