mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 07:16:36 +01:00
d1cea85f33
* Rename `provider` to `providerConfig` The network controller `provider` state has been renamed to `providerConfig`. This better reflects what this state is, and makes this controller more closely aligned with the core network controller. All references to the provider configuration have been updated to prefer `providerConfig` over `provider`, to make the distinction clear between a provider and provider config. Closes #18902 * Add migration
60 lines
1.5 KiB
JavaScript
60 lines
1.5 KiB
JavaScript
import React from 'react';
|
|
import { Provider } from 'react-redux';
|
|
import configureStore from '../../../store/store';
|
|
import testData from '../../../../.storybook/test-data';
|
|
import InteractiveReplacementTokenNotification from '.';
|
|
|
|
const customData = {
|
|
...testData,
|
|
metamask: {
|
|
...testData.metamask,
|
|
providerConfig: {
|
|
type: 'test',
|
|
},
|
|
selectedAddress: '0xca8f1F0245530118D0cf14a06b01Daf8f76Cf281',
|
|
identities: {
|
|
'0xca8f1F0245530118D0cf14a06b01Daf8f76Cf281': {
|
|
address: '0xca8f1F0245530118D0cf14a06b01Daf8f76Cf281',
|
|
name: 'Custodian A',
|
|
},
|
|
},
|
|
isUnlocked: true,
|
|
interactiveReplacementToken: {
|
|
oldRefreshToken:
|
|
'81f96a88b6cbc5f50d3864122349fa9a9755833ee82a7e3cf6f268c78aab51ab',
|
|
url: 'url',
|
|
},
|
|
preferences: {
|
|
useNativeCurrencyAsPrimaryCurrency: true,
|
|
},
|
|
keyrings: [
|
|
{
|
|
type: 'Custody - Saturn',
|
|
accounts: ['0xca8f1F0245530118D0cf14a06b01Daf8f76Cf281'],
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
const store = configureStore(customData);
|
|
|
|
export default {
|
|
title: 'Components/Institutional/InteractiveReplacementToken-Notification',
|
|
decorators: [(story) => <Provider store={store}>{story()}</Provider>],
|
|
component: InteractiveReplacementTokenNotification,
|
|
args: {
|
|
isVisible: true,
|
|
},
|
|
argTypes: {
|
|
onClick: {
|
|
action: 'onClick',
|
|
},
|
|
},
|
|
};
|
|
|
|
export const DefaultStory = (args) => (
|
|
<InteractiveReplacementTokenNotification {...args} />
|
|
);
|
|
|
|
DefaultStory.storyName = 'InteractiveReplacementTokenNotification';
|