mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-01 21:57:06 +01:00
4c9bf40688
* 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
72 lines
1.8 KiB
JavaScript
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';
|