mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Storybook: Fix SignatureRequest component (#14706)
* SB:SignatureRequest: fix control type * SB:SignatureRequest: fix args expected by sanitizeMessage * SignatureRequests: cleanup
This commit is contained in:
parent
dbe89049bd
commit
1464ab724f
@ -3,7 +3,7 @@ import testData from '../../../../.storybook/test-data';
|
||||
import README from './README.mdx';
|
||||
import SignatureRequest from './signature-request.component';
|
||||
|
||||
const primaryIdentity = Object.values(testData.metamask.identities)[0];
|
||||
const [MOCK_PRIMARY_IDENTITY] = Object.values(testData.metamask.identities);
|
||||
|
||||
export default {
|
||||
title: 'Components/App/SignatureRequest',
|
||||
@ -23,13 +23,11 @@ export default {
|
||||
name: { control: 'text' },
|
||||
},
|
||||
},
|
||||
hardwareWalletRequiresConnection: { control: 'boolean' },
|
||||
isLedgerWallet: { control: 'boolean' },
|
||||
clearConfirmTransaction: { action: 'Clean Confirm' },
|
||||
cancel: { action: 'Cancel' },
|
||||
sign: { action: 'Sign' },
|
||||
hardwareWalletRequiresConnection: {
|
||||
action: 'hardwareWalletRequiresConnection',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@ -50,11 +48,31 @@ DefaultStory.args = {
|
||||
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: primaryIdentity,
|
||||
fromAccount: MOCK_PRIMARY_IDENTITY,
|
||||
};
|
||||
|
||||
DefaultStory.storyName = 'Default';
|
||||
|
Loading…
x
Reference in New Issue
Block a user