From 5203a6987bc5d6ee5009b48fbc211d7cc560e02d Mon Sep 17 00:00:00 2001 From: Julien Dambron Date: Wed, 27 Oct 2021 17:07:49 +0200 Subject: [PATCH] chore: eslint import order (#151) * chore: add eslint import order * chore: add lint:fix script * chore: apply eslint import order rules on existing files --- .eslintrc | 8 ++++-- package.json | 2 ++ .../src/generateAssetData/baseAssets.ts | 2 +- .../src/generateAssetData/ethTokens/index.ts | 3 ++- .../generateAssetData/ethTokens/overrides.ts | 2 +- .../generateAssetData/generateAssetData.ts | 3 ++- .../src/service/AssetService.test.ts | 5 ++-- .../asset-service/src/service/AssetService.ts | 3 ++- .../src/service/AssetServiceTestData.ts | 3 ++- packages/caip/src/caip19/caip19.test.ts | 1 + packages/caip/src/caip19/caip19.ts | 4 +-- .../chain-adapters/src/ChainAdapterCLI.ts | 5 ++-- .../src/ChainAdapterManager.test.ts | 1 + .../chain-adapters/src/ChainAdapterManager.ts | 1 + packages/chain-adapters/src/api.ts | 2 +- packages/chain-adapters/src/bip32.test.ts | 1 + .../src/bitcoin/BitcoinChainAdapter.test.ts | 5 ++-- .../src/bitcoin/BitcoinChainAdapter.ts | 7 +++--- .../src/ethereum/EthereumChainAdapter.ts | 9 ++++--- packages/logger/src/index.test.ts | 2 +- .../src/coingecko/coingecko.test.ts | 3 ++- .../market-service/src/coingecko/coingecko.ts | 10 ++++---- packages/market-service/src/index.ts | 5 ++-- packages/swapper/src/api.ts | 10 ++++---- .../src/manager/SwapperManager.test.ts | 5 ++-- .../swapper/src/manager/SwapperManager.ts | 3 ++- packages/swapper/src/swappercli.ts | 10 ++++---- .../swappers/thorchain/ThorchainSwapper.ts | 11 ++++---- .../src/swappers/zrx/ZrxSwapper.test.ts | 19 +++++++------- .../swapper/src/swappers/zrx/ZrxSwapper.ts | 23 +++++++++-------- .../zrx/approvalNeeded/approvalNeeded.test.ts | 9 ++++--- .../zrx/approvalNeeded/approvalNeeded.ts | 14 +++++------ .../approveInfinite/approveInfinite.test.ts | 7 +++--- .../zrx/approveInfinite/approveInfinite.ts | 15 +++++------ .../zrx/buildQuoteTx/buildQuoteTx.test.ts | 9 ++++--- .../swappers/zrx/buildQuoteTx/buildQuoteTx.ts | 25 ++++++++++--------- .../zrx/executeQuote/executeQuote.test.ts | 3 ++- .../swappers/zrx/executeQuote/executeQuote.ts | 3 ++- .../swappers/zrx/getMinMax/getMinMax.test.ts | 4 +-- .../src/swappers/zrx/getMinMax/getMinMax.ts | 3 ++- .../swappers/zrx/getQuote/getQuote.test.ts | 7 +++--- .../src/swappers/zrx/getQuote/getQuote.ts | 9 ++++--- .../zrx/utils/helpers/helpers.test.ts | 17 +++++++------ .../src/swappers/zrx/utils/helpers/helpers.ts | 13 +++++----- .../swappers/zrx/utils/test-data/assets.ts | 2 +- .../zrx/utils/test-data/setupSwapQuote.ts | 3 ++- .../zrx/utils/test-data/setupZrxDeps.ts | 2 +- packages/types/src/base.ts | 1 + packages/types/src/chain-adapters/bitcoin.ts | 1 + packages/types/src/chain-adapters/index.ts | 5 ++-- yarn.lock | 5 ++++ 51 files changed, 186 insertions(+), 139 deletions(-) diff --git a/.eslintrc b/.eslintrc index f8edfe282..33e8b29bf 100644 --- a/.eslintrc +++ b/.eslintrc @@ -12,7 +12,8 @@ "plugins": [ "@typescript-eslint", "prettier", - "jest" + "jest", + "simple-import-sort" ], "env": { "node": true, @@ -45,6 +46,9 @@ "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/no-shadow": [ "error" + ], + "simple-import-sort/imports": [ + "error" ] }, "overrides": [ @@ -59,4 +63,4 @@ } } ] -} \ No newline at end of file +} diff --git a/package.json b/package.json index 35945a3de..81743f145 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "clean": "rimraf node_modules dist packages/**/dist", "dev": "lerna run dev --stream --parallel", "lint": "eslint --cache --max-warnings=0 .", + "lint:fix": "yarn lint --fix", "link-packages": "node scripts/linkPackages.js link", "unlink-packages": "node scripts/linkPackages.js unlink", "test": "jest", @@ -41,6 +42,7 @@ "eslint-plugin-jest": "24.3.6", "eslint-plugin-jsx-a11y": "6.4.1", "eslint-plugin-prettier": "3.4.0", + "eslint-plugin-simple-import-sort": "^7.0.0", "jest": "^27.1.0", "jest-mock-extended": "^1.0.9", "lerna": "^4.0.0", diff --git a/packages/asset-service/src/generateAssetData/baseAssets.ts b/packages/asset-service/src/generateAssetData/baseAssets.ts index 11598c53f..16b59881b 100644 --- a/packages/asset-service/src/generateAssetData/baseAssets.ts +++ b/packages/asset-service/src/generateAssetData/baseAssets.ts @@ -1,4 +1,4 @@ -import { BaseAsset, ContractTypes, NetworkTypes, ChainTypes } from '@shapeshiftoss/types' +import { BaseAsset, ChainTypes, ContractTypes, NetworkTypes } from '@shapeshiftoss/types' export const baseAssets: Array = [ { diff --git a/packages/asset-service/src/generateAssetData/ethTokens/index.ts b/packages/asset-service/src/generateAssetData/ethTokens/index.ts index 49ce51997..e821d7212 100644 --- a/packages/asset-service/src/generateAssetData/ethTokens/index.ts +++ b/packages/asset-service/src/generateAssetData/ethTokens/index.ts @@ -1,6 +1,7 @@ -import axios from 'axios' import { ContractTypes, TokenAsset } from '@shapeshiftoss/types' +import axios from 'axios' import lodash from 'lodash' + import { tokensToOverride } from './overrides' type CoingeckoTokenData = { diff --git a/packages/asset-service/src/generateAssetData/ethTokens/overrides.ts b/packages/asset-service/src/generateAssetData/ethTokens/overrides.ts index 3d9f94f8e..f6d340028 100644 --- a/packages/asset-service/src/generateAssetData/ethTokens/overrides.ts +++ b/packages/asset-service/src/generateAssetData/ethTokens/overrides.ts @@ -1,4 +1,4 @@ -import { TokenAsset, ContractTypes } from '@shapeshiftoss/types' +import { ContractTypes, TokenAsset } from '@shapeshiftoss/types' export const tokensToOverride: Array = [ // example overriding FOX token with custom values instead of goingecko diff --git a/packages/asset-service/src/generateAssetData/generateAssetData.ts b/packages/asset-service/src/generateAssetData/generateAssetData.ts index b17093ea8..6aa61b883 100644 --- a/packages/asset-service/src/generateAssetData/generateAssetData.ts +++ b/packages/asset-service/src/generateAssetData/generateAssetData.ts @@ -1,7 +1,8 @@ +import { BaseAsset, ChainTypes, NetworkTypes } from '@shapeshiftoss/types' import fs from 'fs' + import { baseAssets } from './baseAssets' import { getTokens } from './ethTokens' -import { BaseAsset, ChainTypes, NetworkTypes } from '@shapeshiftoss/types' const generateAssetData = async () => { const generatedAssetData = await Promise.all( diff --git a/packages/asset-service/src/service/AssetService.test.ts b/packages/asset-service/src/service/AssetService.test.ts index 89e00e9d9..6027d2cf6 100644 --- a/packages/asset-service/src/service/AssetService.test.ts +++ b/packages/asset-service/src/service/AssetService.test.ts @@ -1,7 +1,8 @@ -import axios from 'axios' import { Asset, ChainTypes, NetworkTypes } from '@shapeshiftoss/types' +import axios from 'axios' + import { AssetService, flattenAssetData, indexAssetData } from './AssetService' -import { mockBaseAssets, mockAssets, mockIndexedAssetData } from './AssetServiceTestData' +import { mockAssets, mockBaseAssets, mockIndexedAssetData } from './AssetServiceTestData' jest.mock('axios') diff --git a/packages/asset-service/src/service/AssetService.ts b/packages/asset-service/src/service/AssetService.ts index 826f424d0..832fb3b18 100644 --- a/packages/asset-service/src/service/AssetService.ts +++ b/packages/asset-service/src/service/AssetService.ts @@ -1,5 +1,6 @@ -import { BaseAsset, Asset, NetworkTypes, ChainTypes } from '@shapeshiftoss/types' +import { Asset, BaseAsset, ChainTypes, NetworkTypes } from '@shapeshiftoss/types' import axios from 'axios' + import localAssetData from './generatedAssetData.json' export const flattenAssetData = (assetData: BaseAsset[]): Asset[] => { diff --git a/packages/asset-service/src/service/AssetServiceTestData.ts b/packages/asset-service/src/service/AssetServiceTestData.ts index 875e3d726..785359229 100644 --- a/packages/asset-service/src/service/AssetServiceTestData.ts +++ b/packages/asset-service/src/service/AssetServiceTestData.ts @@ -1,6 +1,7 @@ -import { IndexedAssetData } from '..' import { Asset, BaseAsset, ChainTypes, ContractTypes, NetworkTypes } from '@shapeshiftoss/types' +import { IndexedAssetData } from '..' + export const mockBaseAssets: BaseAsset[] = [ { chain: ChainTypes.Ethereum, diff --git a/packages/caip/src/caip19/caip19.test.ts b/packages/caip/src/caip19/caip19.test.ts index d7f745e6f..d0eb34eb5 100644 --- a/packages/caip/src/caip19/caip19.test.ts +++ b/packages/caip/src/caip19/caip19.test.ts @@ -1,4 +1,5 @@ import { ChainTypes, ContractTypes, NetworkTypes } from '@shapeshiftoss/types' + import { fromCAIP19, toCAIP19 } from './caip19' describe('caip19', () => { diff --git a/packages/caip/src/caip19/caip19.ts b/packages/caip/src/caip19/caip19.ts index a93424c99..b783acae4 100644 --- a/packages/caip/src/caip19/caip19.ts +++ b/packages/caip/src/caip19/caip19.ts @@ -1,8 +1,8 @@ -import { fromCAIP2, toCAIP2 } from './../caip2/caip2' // https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md - import { ChainTypes, ContractTypes, NetworkTypes } from '@shapeshiftoss/types' +import { fromCAIP2, toCAIP2 } from './../caip2/caip2' + export enum AssetNamespace { ERC20 = 'erc20', ERC721 = 'erc721', diff --git a/packages/chain-adapters/src/ChainAdapterCLI.ts b/packages/chain-adapters/src/ChainAdapterCLI.ts index d5b72afb3..611a23eb4 100644 --- a/packages/chain-adapters/src/ChainAdapterCLI.ts +++ b/packages/chain-adapters/src/ChainAdapterCLI.ts @@ -1,7 +1,8 @@ -import dotenv from 'dotenv' import { BTCInputScriptType } from '@shapeshiftoss/hdwallet-core' import { NativeAdapterArgs, NativeHDWallet } from '@shapeshiftoss/hdwallet-native' -import { BIP32Params, ChainTypes, chainAdapters } from '@shapeshiftoss/types' +import { BIP32Params, chainAdapters, ChainTypes } from '@shapeshiftoss/types' +import dotenv from 'dotenv' + import { ChainAdapterManager } from './ChainAdapterManager' dotenv.config() diff --git a/packages/chain-adapters/src/ChainAdapterManager.test.ts b/packages/chain-adapters/src/ChainAdapterManager.test.ts index 85c6199a3..6a215f62c 100644 --- a/packages/chain-adapters/src/ChainAdapterManager.test.ts +++ b/packages/chain-adapters/src/ChainAdapterManager.test.ts @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import { ChainTypes } from '@shapeshiftoss/types' + import { ChainAdapterManager } from './ChainAdapterManager' import * as ethereum from './ethereum' diff --git a/packages/chain-adapters/src/ChainAdapterManager.ts b/packages/chain-adapters/src/ChainAdapterManager.ts index c17a7ed8c..9a782ec28 100644 --- a/packages/chain-adapters/src/ChainAdapterManager.ts +++ b/packages/chain-adapters/src/ChainAdapterManager.ts @@ -1,5 +1,6 @@ import { ChainTypes } from '@shapeshiftoss/types' import * as unchained from '@shapeshiftoss/unchained-client' + import { ChainAdapter } from './api' import * as bitcoin from './bitcoin' import * as ethereum from './ethereum' diff --git a/packages/chain-adapters/src/api.ts b/packages/chain-adapters/src/api.ts index 43c066ddd..adfcab36b 100644 --- a/packages/chain-adapters/src/api.ts +++ b/packages/chain-adapters/src/api.ts @@ -1,4 +1,4 @@ -import { chainAdapters, ChainTypes, BIP32Params } from '@shapeshiftoss/types' +import { BIP32Params, chainAdapters, ChainTypes } from '@shapeshiftoss/types' export interface ChainAdapter { /** diff --git a/packages/chain-adapters/src/bip32.test.ts b/packages/chain-adapters/src/bip32.test.ts index 5024cbb24..a9f2a98b2 100644 --- a/packages/chain-adapters/src/bip32.test.ts +++ b/packages/chain-adapters/src/bip32.test.ts @@ -1,4 +1,5 @@ import { BIP32Params } from '@shapeshiftoss/types' + import { fromPath, toPath } from './bip32' describe('fromPath', () => { diff --git a/packages/chain-adapters/src/bitcoin/BitcoinChainAdapter.test.ts b/packages/chain-adapters/src/bitcoin/BitcoinChainAdapter.test.ts index f37e2c918..0f6e9fc1d 100644 --- a/packages/chain-adapters/src/bitcoin/BitcoinChainAdapter.test.ts +++ b/packages/chain-adapters/src/bitcoin/BitcoinChainAdapter.test.ts @@ -6,11 +6,12 @@ * @group unit */ -import axios from 'axios' import { BTCInputScriptType, HDWallet } from '@shapeshiftoss/hdwallet-core' import { NativeAdapterArgs, NativeHDWallet } from '@shapeshiftoss/hdwallet-native' +import { BIP32Params, chainAdapters, ChainTypes } from '@shapeshiftoss/types' import * as unchained from '@shapeshiftoss/unchained-client' -import { BIP32Params, ChainTypes, chainAdapters } from '@shapeshiftoss/types' +import axios from 'axios' + import * as bitcoin from './BitcoinChainAdapter' jest.mock('axios') diff --git a/packages/chain-adapters/src/bitcoin/BitcoinChainAdapter.ts b/packages/chain-adapters/src/bitcoin/BitcoinChainAdapter.ts index cdb0d6f64..77d8d246a 100644 --- a/packages/chain-adapters/src/bitcoin/BitcoinChainAdapter.ts +++ b/packages/chain-adapters/src/bitcoin/BitcoinChainAdapter.ts @@ -1,6 +1,5 @@ -import coinSelect from 'coinselect' -import WAValidator from 'multicoin-address-validator' import { + bip32ToAddressNList, BTCInputScriptType, BTCOutputAddressType, BTCOutputScriptType, @@ -9,11 +8,13 @@ import { BTCSignTxOutput, HDWallet, PublicKey, - bip32ToAddressNList, supportsBTC } from '@shapeshiftoss/hdwallet-core' import { BIP32Params, chainAdapters, ChainTypes, NetworkTypes } from '@shapeshiftoss/types' import { bitcoin } from '@shapeshiftoss/unchained-client' +import coinSelect from 'coinselect' +import WAValidator from 'multicoin-address-validator' + import { ChainAdapter as IChainAdapter } from '../api' import { toPath, toRootDerivationPath } from '../bip32' import { ErrorHandler } from '../error/ErrorHandler' diff --git a/packages/chain-adapters/src/ethereum/EthereumChainAdapter.ts b/packages/chain-adapters/src/ethereum/EthereumChainAdapter.ts index 8d462f231..467d4b7b4 100644 --- a/packages/chain-adapters/src/ethereum/EthereumChainAdapter.ts +++ b/packages/chain-adapters/src/ethereum/EthereumChainAdapter.ts @@ -1,7 +1,3 @@ -import axios from 'axios' -import BigNumber from 'bignumber.js' -import WAValidator from 'multicoin-address-validator' -import { numberToHex } from 'web3-utils' import { Contract } from '@ethersproject/contracts' import { bip32ToAddressNList, ETHSignTx, ETHWallet } from '@shapeshiftoss/hdwallet-core' import { @@ -12,6 +8,11 @@ import { NetworkTypes } from '@shapeshiftoss/types' import { ethereum, unchained } from '@shapeshiftoss/unchained-client' +import axios from 'axios' +import BigNumber from 'bignumber.js' +import WAValidator from 'multicoin-address-validator' +import { numberToHex } from 'web3-utils' + import { ChainAdapter as IChainAdapter } from '../api' import { toPath } from '../bip32' import { ErrorHandler } from '../error/ErrorHandler' diff --git a/packages/logger/src/index.test.ts b/packages/logger/src/index.test.ts index b8fcca9c3..e2cc578fd 100644 --- a/packages/logger/src/index.test.ts +++ b/packages/logger/src/index.test.ts @@ -1,4 +1,4 @@ -import { loggerFactory, Logger, LogLevel } from './index' +import { Logger, loggerFactory, LogLevel } from './index' describe('Logger', () => { it('should export loggerFactory', () => { diff --git a/packages/market-service/src/coingecko/coingecko.test.ts b/packages/market-service/src/coingecko/coingecko.test.ts index d28591d3e..01570008a 100644 --- a/packages/market-service/src/coingecko/coingecko.test.ts +++ b/packages/market-service/src/coingecko/coingecko.test.ts @@ -1,6 +1,7 @@ +import { ChainTypes, HistoryTimeframe } from '@shapeshiftoss/types' import axios from 'axios' + import { getMarketData, getPriceHistory } from '..' -import { ChainTypes, HistoryTimeframe } from '@shapeshiftoss/types' jest.mock('axios') diff --git a/packages/market-service/src/coingecko/coingecko.ts b/packages/market-service/src/coingecko/coingecko.ts index 3223406f5..0dcd64686 100644 --- a/packages/market-service/src/coingecko/coingecko.ts +++ b/packages/market-service/src/coingecko/coingecko.ts @@ -1,13 +1,13 @@ -import axios from 'axios' -import dayjs from 'dayjs' import { ChainTypes, - MarketData, HistoryData, HistoryTimeframe, - PriceHistoryArgs, - MarketDataArgs + MarketData, + MarketDataArgs, + PriceHistoryArgs } from '@shapeshiftoss/types' +import axios from 'axios' +import dayjs from 'dayjs' import { MarketService } from '../api' diff --git a/packages/market-service/src/index.ts b/packages/market-service/src/index.ts index 4ab31ca1c..d7b8512b5 100644 --- a/packages/market-service/src/index.ts +++ b/packages/market-service/src/index.ts @@ -1,5 +1,3 @@ -import { CoinGeckoMarketService } from './coingecko/coingecko' -import { MarketService } from './api' import { HistoryData, MarketDataArgs, @@ -8,6 +6,9 @@ import { PriceHistoryType } from '@shapeshiftoss/types' +import { MarketService } from './api' +import { CoinGeckoMarketService } from './coingecko/coingecko' + export const getDefaultMarketService = (): MarketService => { return new CoinGeckoMarketService() } diff --git a/packages/swapper/src/api.ts b/packages/swapper/src/api.ts index 3fe4ca1ff..30bbcd8d6 100644 --- a/packages/swapper/src/api.ts +++ b/packages/swapper/src/api.ts @@ -1,17 +1,17 @@ import { HDWallet } from '@shapeshiftoss/hdwallet-core' import { - Asset, ApprovalNeededInput, ApprovalNeededOutput, ApproveInfiniteInput, + Asset, BuildQuoteTxInput, - GetQuoteInput, - Quote, - SwapperType, + ChainTypes, ExecQuoteInput, ExecQuoteOutput, + GetQuoteInput, MinMaxOutput, - ChainTypes + Quote, + SwapperType } from '@shapeshiftoss/types' export class SwapError extends Error {} diff --git a/packages/swapper/src/manager/SwapperManager.test.ts b/packages/swapper/src/manager/SwapperManager.test.ts index dd5612478..c3d368d29 100644 --- a/packages/swapper/src/manager/SwapperManager.test.ts +++ b/packages/swapper/src/manager/SwapperManager.test.ts @@ -1,9 +1,10 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ +import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' +import { SwapperType } from '@shapeshiftoss/types' import Web3 from 'web3' + import { ThorchainSwapper, ZrxSwapper } from '../swappers' import { SwapperManager } from './SwapperManager' -import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' -import { SwapperType } from '@shapeshiftoss/types' describe('SwapperManager', () => { const zrxSwapperDeps = { diff --git a/packages/swapper/src/manager/SwapperManager.ts b/packages/swapper/src/manager/SwapperManager.ts index 3a42712df..7aa84accd 100644 --- a/packages/swapper/src/manager/SwapperManager.ts +++ b/packages/swapper/src/manager/SwapperManager.ts @@ -1,6 +1,7 @@ -import { Swapper } from '..' import { GetQuoteInput, SwapperType } from '@shapeshiftoss/types' +import { Swapper } from '..' + export class SwapperError extends Error { constructor(message: string) { super(message) diff --git a/packages/swapper/src/swappercli.ts b/packages/swapper/src/swappercli.ts index 99a3e47ec..41fd3f907 100644 --- a/packages/swapper/src/swappercli.ts +++ b/packages/swapper/src/swappercli.ts @@ -1,12 +1,12 @@ +import { AssetService } from '@shapeshiftoss/asset-service' +import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' +import { NativeAdapterArgs, NativeHDWallet } from '@shapeshiftoss/hdwallet-native' +import { Asset, ChainTypes, NetworkTypes, SwapperType } from '@shapeshiftoss/types' +import BigNumber from 'bignumber.js' import dotenv from 'dotenv' import readline from 'readline-sync' import Web3 from 'web3' -import BigNumber from 'bignumber.js' -import { Asset, NetworkTypes, SwapperType, ChainTypes } from '@shapeshiftoss/types' -import { NativeAdapterArgs, NativeHDWallet } from '@shapeshiftoss/hdwallet-native' -import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' -import { AssetService } from '@shapeshiftoss/asset-service' import { SwapperManager } from './manager/SwapperManager' import { ZrxSwapper } from './swappers/zrx/ZrxSwapper' diff --git a/packages/swapper/src/swappers/thorchain/ThorchainSwapper.ts b/packages/swapper/src/swappers/thorchain/ThorchainSwapper.ts index a6425c1d1..7e63acdfe 100644 --- a/packages/swapper/src/swappers/thorchain/ThorchainSwapper.ts +++ b/packages/swapper/src/swappers/thorchain/ThorchainSwapper.ts @@ -1,13 +1,14 @@ import { - Asset, ApprovalNeededOutput, - SwapperType, - Quote, + Asset, + ChainTypes, ExecQuoteOutput, - MinMaxOutput, GetQuoteInput, - ChainTypes + MinMaxOutput, + Quote, + SwapperType } from '@shapeshiftoss/types' + import { Swapper } from '../../api' export class ThorchainSwapper implements Swapper { diff --git a/packages/swapper/src/swappers/zrx/ZrxSwapper.test.ts b/packages/swapper/src/swappers/zrx/ZrxSwapper.test.ts index da995bf8d..5aaf0c8e8 100644 --- a/packages/swapper/src/swappers/zrx/ZrxSwapper.test.ts +++ b/packages/swapper/src/swappers/zrx/ZrxSwapper.test.ts @@ -1,18 +1,19 @@ -import Web3 from 'web3' -import { HDWallet } from '@shapeshiftoss/hdwallet-core' import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' -import { ChainTypes, GetQuoteInput, SwapperType, Quote } from '@shapeshiftoss/types' -import { ZrxSwapper } from '..' +import { HDWallet } from '@shapeshiftoss/hdwallet-core' +import { ChainTypes, GetQuoteInput, Quote, SwapperType } from '@shapeshiftoss/types' +import Web3 from 'web3' + import { ZrxError } from '../..' -import { setupQuote } from './utils/test-data/setupSwapQuote' -import { FOX, WETH, BTC } from './utils/test-data/assets' +import { ZrxSwapper } from '..' import { buildQuoteTx } from '../zrx/buildQuoteTx/buildQuoteTx' import { executeQuote } from '../zrx/executeQuote/executeQuote' -import { getZrxQuote } from './getQuote/getQuote' -import { getUsdRate } from './utils/helpers/helpers' -import { getMinMax } from './getMinMax/getMinMax' import { approvalNeeded } from './approvalNeeded/approvalNeeded' import { approveInfinite } from './approveInfinite/approveInfinite' +import { getMinMax } from './getMinMax/getMinMax' +import { getZrxQuote } from './getQuote/getQuote' +import { getUsdRate } from './utils/helpers/helpers' +import { BTC, FOX, WETH } from './utils/test-data/assets' +import { setupQuote } from './utils/test-data/setupSwapQuote' jest.mock('./utils/helpers/helpers') jest.mock('../zrx/executeQuote/executeQuote', () => ({ diff --git a/packages/swapper/src/swappers/zrx/ZrxSwapper.ts b/packages/swapper/src/swappers/zrx/ZrxSwapper.ts index 7538db3df..90062c0ca 100644 --- a/packages/swapper/src/swappers/zrx/ZrxSwapper.ts +++ b/packages/swapper/src/swappers/zrx/ZrxSwapper.ts @@ -1,27 +1,28 @@ -import Web3 from 'web3' +import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' import { - Asset, ApprovalNeededInput, ApprovalNeededOutput, ApproveInfiniteInput, + Asset, BuildQuoteTxInput, ChainTypes, + ExecQuoteInput, + ExecQuoteOutput, GetQuoteInput, - Quote, - SwapperType, MinMaxOutput, - ExecQuoteInput, - ExecQuoteOutput + Quote, + SwapperType } from '@shapeshiftoss/types' -import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' +import Web3 from 'web3' + import { Swapper } from '../../api' +import { approvalNeeded } from './approvalNeeded/approvalNeeded' +import { approveInfinite } from './approveInfinite/approveInfinite' import { buildQuoteTx } from './buildQuoteTx/buildQuoteTx' +import { executeQuote } from './executeQuote/executeQuote' +import { getMinMax } from './getMinMax/getMinMax' import { getZrxQuote } from './getQuote/getQuote' import { getUsdRate } from './utils/helpers/helpers' -import { getMinMax } from './getMinMax/getMinMax' -import { executeQuote } from './executeQuote/executeQuote' -import { approvalNeeded } from './approvalNeeded/approvalNeeded' -import { approveInfinite } from './approveInfinite/approveInfinite' export type ZrxSwapperDeps = { adapterManager: ChainAdapterManager diff --git a/packages/swapper/src/swappers/zrx/approvalNeeded/approvalNeeded.test.ts b/packages/swapper/src/swappers/zrx/approvalNeeded/approvalNeeded.test.ts index 631b8e6b0..ab6a2f774 100644 --- a/packages/swapper/src/swappers/zrx/approvalNeeded/approvalNeeded.test.ts +++ b/packages/swapper/src/swappers/zrx/approvalNeeded/approvalNeeded.test.ts @@ -1,11 +1,12 @@ -import Web3 from 'web3' +import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' import { HDWallet } from '@shapeshiftoss/hdwallet-core' import { ChainTypes } from '@shapeshiftoss/types' -import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' -import { approvalNeeded } from './approvalNeeded' +import Web3 from 'web3' + +import { APPROVAL_GAS_LIMIT } from '../utils/constants' import { setupQuote } from '../utils/test-data/setupSwapQuote' import { zrxService } from '../utils/zrxService' -import { APPROVAL_GAS_LIMIT } from '../utils/constants' +import { approvalNeeded } from './approvalNeeded' jest.mock('web3') jest.mock('axios', () => ({ diff --git a/packages/swapper/src/swappers/zrx/approvalNeeded/approvalNeeded.ts b/packages/swapper/src/swappers/zrx/approvalNeeded/approvalNeeded.ts index ebb1c494a..d09eaa75b 100644 --- a/packages/swapper/src/swappers/zrx/approvalNeeded/approvalNeeded.ts +++ b/packages/swapper/src/swappers/zrx/approvalNeeded/approvalNeeded.ts @@ -1,5 +1,3 @@ -import { BigNumber } from 'bignumber.js' -import { AxiosResponse } from 'axios' import { ApprovalNeededInput, ApprovalNeededOutput, @@ -7,18 +5,20 @@ import { QuoteResponse, SwapperType } from '@shapeshiftoss/types' +import { AxiosResponse } from 'axios' +import { BigNumber } from 'bignumber.js' + +import { SwapError } from '../../../api' +import { erc20AllowanceAbi } from '../utils/abi/erc20Allowance-abi' import { AFFILIATE_ADDRESS, APPROVAL_BUY_AMOUNT, APPROVAL_GAS_LIMIT, DEFAULT_SLIPPAGE } from '../utils/constants' - -import { SwapError } from '../../../api' -import { ZrxSwapperDeps } from '../ZrxSwapper' -import { zrxService } from '../utils/zrxService' import { getERC20Allowance } from '../utils/helpers/helpers' -import { erc20AllowanceAbi } from '../utils/abi/erc20Allowance-abi' +import { zrxService } from '../utils/zrxService' +import { ZrxSwapperDeps } from '../ZrxSwapper' export async function approvalNeeded( { adapterManager, web3 }: ZrxSwapperDeps, diff --git a/packages/swapper/src/swappers/zrx/approveInfinite/approveInfinite.test.ts b/packages/swapper/src/swappers/zrx/approveInfinite/approveInfinite.test.ts index 87a9426a0..17fa5d41e 100644 --- a/packages/swapper/src/swappers/zrx/approveInfinite/approveInfinite.test.ts +++ b/packages/swapper/src/swappers/zrx/approveInfinite/approveInfinite.test.ts @@ -1,9 +1,10 @@ -import Web3 from 'web3' import { HDWallet } from '@shapeshiftoss/hdwallet-core' -import { approveInfinite } from './approveInfinite' -import { setupZrxDeps } from '../utils/test-data/setupZrxDeps' +import Web3 from 'web3' + import { setupQuote } from '../utils/test-data/setupSwapQuote' +import { setupZrxDeps } from '../utils/test-data/setupZrxDeps' import { zrxService } from '../utils/zrxService' +import { approveInfinite } from './approveInfinite' jest.mock('web3') jest.mock('../utils/helpers/helpers', () => ({ diff --git a/packages/swapper/src/swappers/zrx/approveInfinite/approveInfinite.ts b/packages/swapper/src/swappers/zrx/approveInfinite/approveInfinite.ts index 5623e3c10..a2401551a 100644 --- a/packages/swapper/src/swappers/zrx/approveInfinite/approveInfinite.ts +++ b/packages/swapper/src/swappers/zrx/approveInfinite/approveInfinite.ts @@ -1,12 +1,13 @@ -import { AxiosResponse } from 'axios' -import { ApproveInfiniteInput, QuoteResponse, ChainTypes, SwapperType } from '@shapeshiftoss/types' import { ChainAdapter } from '@shapeshiftoss/chain-adapters' -import { ZrxSwapperDeps } from '../ZrxSwapper' -import { DEFAULT_SLIPPAGE, AFFILIATE_ADDRESS, MAX_ALLOWANCE } from '../utils/constants' -import { zrxService } from '../utils/zrxService' -import { grantAllowance } from '../utils/helpers/helpers' -import { erc20Abi } from '../utils/abi/erc20-abi' +import { ApproveInfiniteInput, ChainTypes, QuoteResponse, SwapperType } from '@shapeshiftoss/types' +import { AxiosResponse } from 'axios' + import { SwapError } from '../../../api' +import { erc20Abi } from '../utils/abi/erc20-abi' +import { AFFILIATE_ADDRESS, DEFAULT_SLIPPAGE, MAX_ALLOWANCE } from '../utils/constants' +import { grantAllowance } from '../utils/helpers/helpers' +import { zrxService } from '../utils/zrxService' +import { ZrxSwapperDeps } from '../ZrxSwapper' export async function approveInfinite( { adapterManager, web3 }: ZrxSwapperDeps, diff --git a/packages/swapper/src/swappers/zrx/buildQuoteTx/buildQuoteTx.test.ts b/packages/swapper/src/swappers/zrx/buildQuoteTx/buildQuoteTx.test.ts index e43508263..af04f1f7a 100644 --- a/packages/swapper/src/swappers/zrx/buildQuoteTx/buildQuoteTx.test.ts +++ b/packages/swapper/src/swappers/zrx/buildQuoteTx/buildQuoteTx.test.ts @@ -1,12 +1,13 @@ -import BigNumber from 'bignumber.js' import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' import { HDWallet } from '@shapeshiftoss/hdwallet-core' +import { ChainTypes, GetQuoteInput } from '@shapeshiftoss/types' +import BigNumber from 'bignumber.js' import Web3 from 'web3' -import { buildQuoteTx } from './buildQuoteTx' + +import { APPROVAL_GAS_LIMIT, DEFAULT_SLIPPAGE, MAX_SLIPPAGE } from '../utils/constants' import { setupQuote } from '../utils/test-data/setupSwapQuote' import { zrxService } from '../utils/zrxService' -import { APPROVAL_GAS_LIMIT, MAX_SLIPPAGE, DEFAULT_SLIPPAGE } from '../utils/constants' -import { ChainTypes, GetQuoteInput } from '@shapeshiftoss/types' +import { buildQuoteTx } from './buildQuoteTx' jest.mock('web3') diff --git a/packages/swapper/src/swappers/zrx/buildQuoteTx/buildQuoteTx.ts b/packages/swapper/src/swappers/zrx/buildQuoteTx/buildQuoteTx.ts index 42c5969c0..ee64bdaea 100644 --- a/packages/swapper/src/swappers/zrx/buildQuoteTx/buildQuoteTx.ts +++ b/packages/swapper/src/swappers/zrx/buildQuoteTx/buildQuoteTx.ts @@ -1,26 +1,27 @@ -import BigNumber from 'bignumber.js' -import { AxiosResponse } from 'axios' -import * as rax from 'retry-axios' -import { SwapError } from '../../..' import { + BuildQuoteTxInput, ChainTypes, - SwapperType, Quote, QuoteResponse, - BuildQuoteTxInput + SwapperType } from '@shapeshiftoss/types' -import { ZrxSwapperDeps } from '../ZrxSwapper' -import { applyAxiosRetry } from '../utils/applyAxiosRetry' +import { AxiosResponse } from 'axios' +import BigNumber from 'bignumber.js' +import * as rax from 'retry-axios' + +import { SwapError } from '../../..' import { erc20AllowanceAbi } from '../utils/abi/erc20Allowance-abi' -import { normalizeAmount, getAllowanceRequired } from '../utils/helpers/helpers' -import { zrxService } from '../utils/zrxService' +import { applyAxiosRetry } from '../utils/applyAxiosRetry' import { - DEFAULT_SLIPPAGE, - DEFAULT_SOURCE, AFFILIATE_ADDRESS, APPROVAL_GAS_LIMIT, + DEFAULT_SLIPPAGE, + DEFAULT_SOURCE, MAX_SLIPPAGE } from '../utils/constants' +import { getAllowanceRequired, normalizeAmount } from '../utils/helpers/helpers' +import { zrxService } from '../utils/zrxService' +import { ZrxSwapperDeps } from '../ZrxSwapper' export async function buildQuoteTx( { adapterManager, web3 }: ZrxSwapperDeps, diff --git a/packages/swapper/src/swappers/zrx/executeQuote/executeQuote.test.ts b/packages/swapper/src/swappers/zrx/executeQuote/executeQuote.test.ts index 0aa3bf40b..0c0d5d233 100644 --- a/packages/swapper/src/swappers/zrx/executeQuote/executeQuote.test.ts +++ b/packages/swapper/src/swappers/zrx/executeQuote/executeQuote.test.ts @@ -1,8 +1,9 @@ import { HDWallet } from '@shapeshiftoss/hdwallet-core' import { ChainTypes, ExecQuoteInput, SwapperType } from '@shapeshiftoss/types' -import { executeQuote } from './executeQuote' + import { setupQuote } from '../utils/test-data/setupSwapQuote' import { ZrxSwapperDeps } from '../ZrxSwapper' +import { executeQuote } from './executeQuote' describe('executeQuote', () => { const { quoteInput, sellAsset } = setupQuote() diff --git a/packages/swapper/src/swappers/zrx/executeQuote/executeQuote.ts b/packages/swapper/src/swappers/zrx/executeQuote/executeQuote.ts index 9f2dd92f4..2b6ec54b6 100644 --- a/packages/swapper/src/swappers/zrx/executeQuote/executeQuote.ts +++ b/packages/swapper/src/swappers/zrx/executeQuote/executeQuote.ts @@ -1,5 +1,6 @@ +import { ChainTypes, ExecQuoteInput, ExecQuoteOutput, SwapperType } from '@shapeshiftoss/types' import { numberToHex } from 'web3-utils' -import { ExecQuoteInput, ExecQuoteOutput, ChainTypes, SwapperType } from '@shapeshiftoss/types' + import { SwapError } from '../../../api' import { ZrxSwapperDeps } from '../ZrxSwapper' diff --git a/packages/swapper/src/swappers/zrx/getMinMax/getMinMax.test.ts b/packages/swapper/src/swappers/zrx/getMinMax/getMinMax.test.ts index 69ba1fc1c..b093023e2 100644 --- a/packages/swapper/src/swappers/zrx/getMinMax/getMinMax.test.ts +++ b/packages/swapper/src/swappers/zrx/getMinMax/getMinMax.test.ts @@ -1,10 +1,10 @@ jest.mock('../utils/zrxService') jest.mock('../utils/helpers/helpers') +import { MAX_ZRX_TRADE } from '../utils/constants' +import { BTC, FOX, WETH } from '../utils/test-data/assets' import { zrxService as mockZrxService } from '../utils/zrxService' import { getMinMax } from './getMinMax' -import { FOX, WETH, BTC } from '../utils/test-data/assets' -import { MAX_ZRX_TRADE } from '../utils/constants' ;(>mockZrxService.get).mockImplementation(() => ({ data: { price: '100' } })) diff --git a/packages/swapper/src/swappers/zrx/getMinMax/getMinMax.ts b/packages/swapper/src/swappers/zrx/getMinMax/getMinMax.ts index 8133725bc..d745b1ed1 100644 --- a/packages/swapper/src/swappers/zrx/getMinMax/getMinMax.ts +++ b/packages/swapper/src/swappers/zrx/getMinMax/getMinMax.ts @@ -1,5 +1,6 @@ -import { ChainTypes, GetQuoteInput, QuoteResponse, MinMaxOutput } from '@shapeshiftoss/types' +import { ChainTypes, GetQuoteInput, MinMaxOutput, QuoteResponse } from '@shapeshiftoss/types' import BigNumber from 'bignumber.js' + import { MAX_ZRX_TRADE } from '../utils/constants' import { getUsdRate, normalizeAmount } from '../utils/helpers/helpers' import { zrxService } from '../utils/zrxService' diff --git a/packages/swapper/src/swappers/zrx/getQuote/getQuote.test.ts b/packages/swapper/src/swappers/zrx/getQuote/getQuote.test.ts index 17b5cad4d..e8945146f 100644 --- a/packages/swapper/src/swappers/zrx/getQuote/getQuote.test.ts +++ b/packages/swapper/src/swappers/zrx/getQuote/getQuote.test.ts @@ -1,11 +1,12 @@ -import { ChainTypes } from '@shapeshiftoss/types' import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' -import Web3 from 'web3' +import { ChainTypes } from '@shapeshiftoss/types' import BigNumber from 'bignumber.js' +import Web3 from 'web3' + import { ZrxSwapper } from '../..' -import { zrxService } from '../utils/zrxService' import { normalizeAmount } from '../utils/helpers/helpers' import { setupQuote } from '../utils/test-data/setupSwapQuote' +import { zrxService } from '../utils/zrxService' const axios = jest.createMockFromModule('axios') //@ts-ignore diff --git a/packages/swapper/src/swappers/zrx/getQuote/getQuote.ts b/packages/swapper/src/swappers/zrx/getQuote/getQuote.ts index 8289dc43f..ace64c3d1 100644 --- a/packages/swapper/src/swappers/zrx/getQuote/getQuote.ts +++ b/packages/swapper/src/swappers/zrx/getQuote/getQuote.ts @@ -1,5 +1,3 @@ -import { AxiosResponse } from 'axios' -import BigNumber from 'bignumber.js' import { ChainTypes, GetQuoteInput, @@ -8,9 +6,12 @@ import { SwapperType, SwapSource } from '@shapeshiftoss/types' -import { MAX_ZRX_TRADE, APPROVAL_GAS_LIMIT, DEFAULT_SOURCE } from '../utils/constants' -import { zrxService } from '../utils/zrxService' +import { AxiosResponse } from 'axios' +import BigNumber from 'bignumber.js' + +import { APPROVAL_GAS_LIMIT, DEFAULT_SOURCE, MAX_ZRX_TRADE } from '../utils/constants' import { normalizeAmount } from '../utils/helpers/helpers' +import { zrxService } from '../utils/zrxService' import { ZrxError } from '../ZrxSwapper' export async function getZrxQuote( diff --git a/packages/swapper/src/swappers/zrx/utils/helpers/helpers.test.ts b/packages/swapper/src/swappers/zrx/utils/helpers/helpers.test.ts index b114e89b3..6e5c933bb 100644 --- a/packages/swapper/src/swappers/zrx/utils/helpers/helpers.test.ts +++ b/packages/swapper/src/swappers/zrx/utils/helpers/helpers.test.ts @@ -1,17 +1,18 @@ -import Web3 from 'web3' -import BigNumber from 'bignumber.js' -import { ChainTypes } from '@shapeshiftoss/types' -import { HDWallet } from '@shapeshiftoss/hdwallet-core' import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' -import { setupQuote } from '../test-data/setupSwapQuote' -import { erc20AllowanceAbi } from '../abi/erc20Allowance-abi' +import { HDWallet } from '@shapeshiftoss/hdwallet-core' +import { ChainTypes } from '@shapeshiftoss/types' +import BigNumber from 'bignumber.js' +import Web3 from 'web3' + import { erc20Abi } from '../abi/erc20-abi' +import { erc20AllowanceAbi } from '../abi/erc20Allowance-abi' import { - normalizeAmount, getAllowanceRequired, getUsdRate, - grantAllowance + grantAllowance, + normalizeAmount } from '../helpers/helpers' +import { setupQuote } from '../test-data/setupSwapQuote' import { zrxService } from '../zrxService' jest.mock('web3') diff --git a/packages/swapper/src/swappers/zrx/utils/helpers/helpers.ts b/packages/swapper/src/swappers/zrx/utils/helpers/helpers.ts index d62ac7354..dfbdc64c8 100644 --- a/packages/swapper/src/swappers/zrx/utils/helpers/helpers.ts +++ b/packages/swapper/src/swappers/zrx/utils/helpers/helpers.ts @@ -1,13 +1,14 @@ -import BigNumber from 'bignumber.js' +import { ChainAdapter } from '@shapeshiftoss/chain-adapters' +import { HDWallet } from '@shapeshiftoss/hdwallet-core' +import { Asset, ChainTypes, Quote, QuoteResponse, SwapperType } from '@shapeshiftoss/types' import { AxiosResponse } from 'axios' -import { numberToHex, AbiItem } from 'web3-utils' +import BigNumber from 'bignumber.js' import Web3 from 'web3' -import { Asset, ChainTypes, Quote, QuoteResponse, SwapperType } from '@shapeshiftoss/types' -import { HDWallet } from '@shapeshiftoss/hdwallet-core' -import { ChainAdapter } from '@shapeshiftoss/chain-adapters' -import { zrxService } from '../zrxService' +import { AbiItem, numberToHex } from 'web3-utils' + import { SwapError } from '../../../../api' import { ZrxError } from '../../ZrxSwapper' +import { zrxService } from '../zrxService' export type GetAllowanceRequiredArgs = { quote: Quote diff --git a/packages/swapper/src/swappers/zrx/utils/test-data/assets.ts b/packages/swapper/src/swappers/zrx/utils/test-data/assets.ts index 58acd087c..e90fff705 100644 --- a/packages/swapper/src/swappers/zrx/utils/test-data/assets.ts +++ b/packages/swapper/src/swappers/zrx/utils/test-data/assets.ts @@ -1,4 +1,4 @@ -import { ChainTypes, ContractTypes, NetworkTypes, Asset } from '@shapeshiftoss/types' +import { Asset, ChainTypes, ContractTypes, NetworkTypes } from '@shapeshiftoss/types' export const BTC: Asset = { name: 'bitcoin', diff --git a/packages/swapper/src/swappers/zrx/utils/test-data/setupSwapQuote.ts b/packages/swapper/src/swappers/zrx/utils/test-data/setupSwapQuote.ts index 8cedb701c..9ebe9b2bf 100644 --- a/packages/swapper/src/swappers/zrx/utils/test-data/setupSwapQuote.ts +++ b/packages/swapper/src/swappers/zrx/utils/test-data/setupSwapQuote.ts @@ -1,6 +1,7 @@ import { Asset } from '@shapeshiftoss/types' -import { FOX, WETH } from './assets' + import { DEFAULT_SLIPPAGE } from '../constants' +import { FOX, WETH } from './assets' export const setupQuote = () => { const sellAsset: Asset = { ...FOX } diff --git a/packages/swapper/src/swappers/zrx/utils/test-data/setupZrxDeps.ts b/packages/swapper/src/swappers/zrx/utils/test-data/setupZrxDeps.ts index d8715bace..560ce8a0c 100644 --- a/packages/swapper/src/swappers/zrx/utils/test-data/setupZrxDeps.ts +++ b/packages/swapper/src/swappers/zrx/utils/test-data/setupZrxDeps.ts @@ -1,5 +1,5 @@ -import { ChainTypes } from '@shapeshiftoss/types' import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters' +import { ChainTypes } from '@shapeshiftoss/types' import Web3 from 'web3' export const setupZrxDeps = () => { diff --git a/packages/types/src/base.ts b/packages/types/src/base.ts index 01394becf..5ad0d4141 100644 --- a/packages/types/src/base.ts +++ b/packages/types/src/base.ts @@ -1,4 +1,5 @@ import { HDWallet } from '@shapeshiftoss/hdwallet-core' + import { QuoteFeeData, SignTxInput } from './chain-adapters' /** Common */ diff --git a/packages/types/src/chain-adapters/bitcoin.ts b/packages/types/src/chain-adapters/bitcoin.ts index 4e0085acf..54cb569bb 100644 --- a/packages/types/src/chain-adapters/bitcoin.ts +++ b/packages/types/src/chain-adapters/bitcoin.ts @@ -1,4 +1,5 @@ import { BTCInputScriptType } from '@shapeshiftoss/hdwallet-core' + import { GetAddressInputBase } from '.' export type Account = { diff --git a/packages/types/src/chain-adapters/index.ts b/packages/types/src/chain-adapters/index.ts index 4a8dfb41e..e8b8581e8 100644 --- a/packages/types/src/chain-adapters/index.ts +++ b/packages/types/src/chain-adapters/index.ts @@ -1,8 +1,9 @@ -import { HDWallet, BTCInputScriptType, BTCSignTx, ETHSignTx } from '@shapeshiftoss/hdwallet-core' +import { BTCInputScriptType, BTCSignTx, ETHSignTx, HDWallet } from '@shapeshiftoss/hdwallet-core' + import { BIP32Params, ChainTypes, NetworkTypes, SwapperType } from '../base' import { ChainAndSwapperSpecific, ChainSpecific } from '../utility' -import * as ethereum from './ethereum' import * as bitcoin from './bitcoin' +import * as ethereum from './ethereum' export { bitcoin, ethereum } diff --git a/yarn.lock b/yarn.lock index 12a83c268..fca9e4367 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5603,6 +5603,11 @@ eslint-plugin-prettier@3.4.0: dependencies: prettier-linter-helpers "^1.0.0" +eslint-plugin-simple-import-sort@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-7.0.0.tgz#a1dad262f46d2184a90095a60c66fef74727f0f8" + integrity sha512-U3vEDB5zhYPNfxT5TYR7u01dboFZp+HNpnGhkDB2g/2E4wZ/g1Q9Ton8UwCLfRV9yAKyYqDh62oHOamvkFxsvw== + eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"