mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-02 06:07:06 +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
33 lines
787 B
JavaScript
33 lines
787 B
JavaScript
import React from 'react';
|
|
import configureMockStore from 'redux-mock-store';
|
|
import { renderWithProvider } from '../../../../../../test/lib/render-helpers';
|
|
import CancelTransactionGasFee from './cancel-transaction-gas-fee.component';
|
|
|
|
describe('CancelTransactionGasFee Component', () => {
|
|
const mockState = {
|
|
metamask: {
|
|
providerConfig: {
|
|
chainId: '0x4',
|
|
},
|
|
preferences: {
|
|
useNativeCurrencyAsPrimaryCurrency: false,
|
|
},
|
|
},
|
|
};
|
|
|
|
const mockStore = configureMockStore()(mockState);
|
|
|
|
it('should render', () => {
|
|
const props = {
|
|
value: '0x3b9aca00',
|
|
};
|
|
|
|
const { container } = renderWithProvider(
|
|
<CancelTransactionGasFee {...props} />,
|
|
mockStore,
|
|
);
|
|
|
|
expect(container).toMatchSnapshot();
|
|
});
|
|
});
|