Skip to content

Commit 36b6faf

Browse files
committed
Remove default export
We don't use default exports in our libraries. This commit changes `SmartTransactionsController` from a default export to a named export.
1 parent dd52197 commit 36b6faf

5 files changed

Lines changed: 9 additions & 48 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
- Upgrade `@metamask/base-controller` from `^7.0.1` to `^8.3.0` ([#529](https://github.com/MetaMask/smart-transactions-controller/pull/529))
2020
- Upgrade `@metamask/polling-controller` from `^12.0.0` to `^14.0.0` ([#529](https://github.com/MetaMask/smart-transactions-controller/pull/529))
2121

22+
### Removed
23+
24+
- **BREAKING:** Remove default export ([#535](https://github.com/MetaMask/smart-transactions-controller/pull/535))
25+
- Use `import { SmartTransactionsController } from '@metamask/smart-transactions-controller'` instead.
26+
2227
## [18.1.0]
2328

2429
### Added

src/SmartTransactionsController.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ import {
2727
SENTINEL_API_BASE_URL_MAP,
2828
SmartTransactionsTraceName,
2929
} from './constants';
30-
import SmartTransactionsController, {
30+
import {
3131
DEFAULT_INTERVAL,
32+
SmartTransactionsController,
3233
getDefaultSmartTransactionsControllerState,
3334
} from './SmartTransactionsController';
3435
import type {

src/SmartTransactionsController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export type SmartTransactionsControllerPollingInput = {
220220
chainIds: Hex[];
221221
};
222222

223-
export default class SmartTransactionsController extends StaticIntervalPollingController<SmartTransactionsControllerPollingInput>()<
223+
export class SmartTransactionsController extends StaticIntervalPollingController<SmartTransactionsControllerPollingInput>()<
224224
typeof controllerName,
225225
SmartTransactionsControllerState,
226226
SmartTransactionsControllerMessenger

src/index.test.ts

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { default } from './SmartTransactionsController';
1+
export { SmartTransactionsController } from './SmartTransactionsController';
22
export type {
33
SmartTransactionsControllerMessenger,
44
SmartTransactionsControllerState,

0 commit comments

Comments
 (0)