1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-01 21:57:06 +01:00
metamask-extension/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.stories.js
António Regadas 8fdbd07c91
[MMI] Interactive replacement token modal (#18523)
* updates styles for confirm-add-institutional-feature

* initial component

* adds tests and storybook file

* clean up styles and adds MM design system

* prettier

* locale update

* lint

* snapshot update

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-14 11:35:58 +01:00

73 lines
2.0 KiB
JavaScript

import React from 'react';
import { Provider } from 'react-redux';
import configureStore from '../../../store/store';
import testData from '../../../../.storybook/test-data';
import InteractiveReplacementTokenModal from '.';
const customData = {
...testData,
metamask: {
...testData.metamask,
mmiConfiguration: {
portfolio: {
enabled: true,
url: 'https://dev.metamask-institutional.io/',
},
features: {
websocketApi: true,
},
custodians: [
{
refreshTokenUrl:
'https://saturn-custody.dev.metamask-institutional.io/oauth/token',
name: 'saturn-dev',
displayName: 'Saturn Custody',
enabled: true,
mmiApiUrl: 'https://api.dev.metamask-institutional.io/v1',
websocketApiUrl:
'wss://websocket.dev.metamask-institutional.io/v1/ws',
apiBaseUrl:
'https://saturn-custody.dev.metamask-institutional.io/eth',
iconUrl:
'https://saturn-custody-ui.dev.metamask-institutional.io/saturn.svg',
isNoteToTraderSupported: true,
},
],
},
custodyAccountDetails: {
'0xAddress': {
address: '0xAddress',
details: 'details',
custodyType: 'testCustody - Saturn',
custodianName: 'saturn-dev',
},
},
provider: {
type: 'test',
},
selectedAddress: '0xAddress',
isUnlocked: true,
interactiveReplacementToken: {
oldRefreshToken: 'abc',
url: 'https://saturn-custody-ui.dev.metamask-institutional.io',
},
preferences: {
useNativeCurrencyAsPrimaryCurrency: true,
},
},
};
const store = configureStore(customData);
export default {
title: 'Components/Institutional/InteractiveReplacementToken-Modal',
decorators: [(story) => <Provider store={store}>{story()}</Provider>],
component: InteractiveReplacementTokenModal,
};
export const DefaultStory = (args) => (
<InteractiveReplacementTokenModal {...args} />
);
DefaultStory.storyName = 'InteractiveReplacementTokenModal';