Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tree-shake mnemonist #83

Merged
merged 2 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
fix: tree-shake mnemonist
  • Loading branch information
zzmp committed Mar 28, 2022
commit f69c3acd22caab7236c824b8a108b620d3eea211
8 changes: 8 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
"message": "Please import from '@ethersproject/module' directly to support tree-shaking."
}
]
},
{
"paths": [
{
"name": "mnemonist",
"message": "Please import from 'mnemonist/module' directly to support tree-shaking."
}
]
}
]
}
Expand Down
5 changes: 4 additions & 1 deletion src/routers/alpha-router/functions/best-swap-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ import { Protocol } from '@uniswap/router-sdk';
import { TradeType } from '@uniswap/sdk-core';
import JSBI from 'jsbi';
import _ from 'lodash';
import { FixedReverseHeap, Queue } from 'mnemonist';
import FixedReverseHeap from 'mnemonist/fixed-reverse-heap';
import Queue from 'mnemonist/queue';

import { ChainId, HAS_L1_FEE } from '../../../util';
import { CurrencyAmount } from '../../../util/amounts';
import { log } from '../../../util/log';
import { metric, MetricLoggerUnit } from '../../../util/metric';
import { routeAmountsToString, routeToString } from '../../../util/routes';
import { AlphaRouterConfig } from '../alpha-router';
import { IGasModel, L1ToL2GasCosts, usdGasTokensByChain } from '../gas-models';

import {
RouteWithValidQuote,
V3RouteWithValidQuote,
Expand Down