Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/perps-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Preserve `/* webpackIgnore: true */` magic comment in built dist files by using a variable for the MYXProvider dynamic import path, preventing ts-bridge from rewriting the AST node and stripping the comment ([#8424](https://github.com/MetaMask/core/pull/8424))
- Fix incorrect fee estimate when flipping a position ([#8333](https://github.com/MetaMask/core/pull/8333))
- Fix incorrect PnL and order size displayed after SL execution ([#8333](https://github.com/MetaMask/core/pull/8333))
- Fix stop loss not showing up in recent activity ([#8333](https://github.com/MetaMask/core/pull/8333))
Expand Down
5 changes: 4 additions & 1 deletion packages/perps-controller/src/PerpsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1694,8 +1694,11 @@ export class PerpsController extends BaseController<
// IMPORTANT: Must use import() — NOT require() — for core/extension tree-shaking.
// require() is synchronous and bundlers include it in the main bundle.
// import() enables true code splitting so MYX is excluded when not enabled.
// NOTE: Uses a variable so ts-bridge does not rewrite the import
// specifier (which would strip the webpackIgnore magic comment).
const myxModulePath = './providers/MYXProvider';
this.#myxRegistrationPromise = import(
/* webpackIgnore: true */ './providers/MYXProvider'
/* webpackIgnore: true */ myxModulePath
)
.then(({ MYXProvider }) => {
this.registerMYXProvider(MYXProvider);
Expand Down
Loading