fixed linting issues

This commit is contained in:
Noah Khamliche
2022-04-28 14:04:25 -04:00
parent 08cf51b101
commit feede28293
5 changed files with 11 additions and 20 deletions

View File

@@ -24,7 +24,6 @@ import {
ELLIPSIS_BSC_INFOS,
FIREBIRDONESWAP_BSC_INFOS,
FIREBIRDONESWAP_POLYGON_INFOS,
GMX_ROUTER_BY_CHAIN_ID,
IRONSWAP_POLYGON_INFOS,
JETSWAP_ROUTER_BY_CHAIN_ID,
JULSWAP_ROUTER_BY_CHAIN_ID,

View File

@@ -19,7 +19,6 @@ import {
FillData,
FinalUniswapV3FillData,
GeistFillData,
GMXFillData,
GetMarketOrdersOpts,
isFinalUniswapV3FillData,
KyberSamplerOpts,

View File

@@ -21,7 +21,6 @@ import {
GeistFillData,
GenericRouterFillData,
GMXFillData,
GMXSwapFillData,
KyberDmmFillData,
KyberFillData,
LidoFillData,
@@ -373,7 +372,12 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
break;
case ERC20BridgeSource.GMX:
const gmxFillData = (order as OptimizedMarketBridgeOrder<GMXFillData>).fillData;
bridgeData = encoder.encode([gmxFillData.router,gmxFillData.reader,gmxFillData.vault, gmxFillData.tokenAddressPath]);
bridgeData = encoder.encode([
gmxFillData.router,
gmxFillData.reader,
gmxFillData.vault,
gmxFillData.tokenAddressPath,
]);
break;
default:
@@ -463,7 +467,6 @@ const routerAddressPathEncoder = AbiEncoder.create('(address,address[])');
const gmxAddressPathEncoder = AbiEncoder.create('(address,address,address,address[])');
const tokenAddressEncoder = AbiEncoder.create([{ name: 'tokenAddress', type: 'address' }]);
export const BRIDGE_ENCODERS: {
[key in Exclude<
ERC20BridgeSource,
@@ -516,7 +519,7 @@ export const BRIDGE_ENCODERS: {
[ERC20BridgeSource.SpookySwap]: routerAddressPathEncoder,
[ERC20BridgeSource.MorpheusSwap]: routerAddressPathEncoder,
// Avalanche
[ERC20BridgeSource.GMX] : gmxAddressPathEncoder,
[ERC20BridgeSource.GMX]: gmxAddressPathEncoder,
// Celo
[ERC20BridgeSource.UbeSwap]: routerAddressPathEncoder,
// BSC

View File

@@ -75,7 +75,6 @@ import {
GeistInfo,
GenericRouterFillData,
GMXFillData,
GMXQuoteFillData,
HopInfo,
KyberDmmFillData,
KyberFillData,
@@ -1227,7 +1226,7 @@ export class SamplerOperations {
): SourceQuoteOperation<GMXFillData> {
return new SamplerContractOperation({
source: ERC20BridgeSource.GMX,
fillData: {router, reader, vault, tokenAddressPath },
fillData: { router, reader, vault, tokenAddressPath },
contract: this._samplerContract,
function: this._samplerContract.sampleSellsFromGMX,
params: [reader, vault, tokenAddressPath, takerFillAmounts],
@@ -1242,7 +1241,7 @@ export class SamplerOperations {
): SourceQuoteOperation<GMXFillData> {
return new SamplerContractOperation({
source: ERC20BridgeSource.GMX,
fillData: {router, reader, vault, tokenAddressPath },
fillData: { router, reader, vault, tokenAddressPath },
contract: this._samplerContract,
function: this._samplerContract.sampleBuysFromGMX,
params: [reader, vault, tokenAddressPath, makerFillAmounts],
@@ -1641,7 +1640,6 @@ export class SamplerOperations {
);
}
case ERC20BridgeSource.GMX: {
return this.getGMXSellQuotes(
GMX_ROUTER_BY_CHAIN_ID[this.chainId],
GMX_READER_BY_CHAIN_ID[this.chainId],
@@ -1955,7 +1953,6 @@ export class SamplerOperations {
return this.getCompoundBuyQuotes(cToken.tokenAddress, makerToken, takerToken, makerFillAmounts);
}
case ERC20BridgeSource.GMX: {
return this.getGMXBuyQuotes(
GMX_ROUTER_BY_CHAIN_ID[this.chainId],
GMX_READER_BY_CHAIN_ID[this.chainId],

View File

@@ -94,6 +94,7 @@ export enum ERC20BridgeSource {
// Avalanche
Pangolin = 'Pangolin',
TraderJoe = 'TraderJoe',
// tslint:disable-next-line: enum-naming
GMX = 'GMX',
// Celo only
UbeSwap = 'UbeSwap',
@@ -223,21 +224,13 @@ export interface UniswapV2FillData extends FillData {
tokenAddressPath: string[];
router: string;
}
export interface GMXQuoteFillData extends FillData {
tokenAddressPath: string[];
reader: string;
vault: string;
}
export interface GMXFillData extends FillData {
router: string;
reader: string;
vault: string;
tokenAddressPath: string[];
}
export interface GMXSwapFillData extends FillData {
router: string;
tokenAddressPath: string[];
}
export interface ShellFillData extends FillData {
poolAddress: string;