1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00
metamask-extension/ui/pages/institutional/interactive-replacement-token-page/interactive-replacement-token-page.stories.js
Albert Olivé 4c9bf40688
[MMI] Add interactive-replacement-token-page (#18683)
* Initial commit

* converted the component from class-based to functional.

* Refactored component

* Improved code and tests

* Finished adding tests

* Fixed eslint problems

* Added back custodyLabels component

* Fixed eslint problems

* fixed ts lint problem

* Fixed eslint problems

* Added more tests and improved code

* Added comments

* Fixed eslint problems

* Fixed eslint problems
2023-04-27 10:45:37 +02:00

72 lines
1.8 KiB
JavaScript

import React from 'react';
import { Provider } from 'react-redux';
import { action } from '@storybook/addon-actions';
import configureStore from '../../../store/store';
import testData from '../../../../.storybook/test-data';
import InteractiveReplacementTokenPage from '.';
const address = '0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F';
const customData = {
...testData,
metamask: {
...testData.metamask,
modal: { props: address },
selectedAddress: address,
interactiveReplacementToken: {
url: 'https://saturn-custody-ui.codefi.network/',
},
custodyAccountDetails: {
[address]: { balance: '0x', custodianName: 'Jupiter' },
},
mmiConfiguration: {
custodians: [
{
production: true,
name: 'Jupiter',
type: 'Jupiter',
iconUrl: 'iconUrl',
displayName: 'displayName',
},
],
},
institutionalFeatures: {
complianceProjectId: '',
connectRequests: [
{
labels: [
{
key: 'service',
value: 'test',
},
],
origin: 'origin',
token: 'testToken',
feature: 'custodian',
service: 'Jupiter',
apiUrl: 'https://',
environment: 'Jupiter',
},
],
},
},
};
const store = configureStore(customData);
export default {
title: 'Pages/Institutional/InteractiveReplacementTokenPage',
decorators: [(story) => <Provider store={store}>{story()}</Provider>],
component: InteractiveReplacementTokenPage,
args: {
history: {
push: action('history.push()'),
},
},
};
export const DefaultStory = (args) => (
<InteractiveReplacementTokenPage {...args} />
);
DefaultStory.storyName = 'InteractiveReplacementTokenPage';