Skip to content

Commit

Permalink
Removed extraneous debug calls (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
silochad committed Jun 28, 2023
2 parents 6e1bd3d + 64f395e commit 13db5b4
Show file tree
Hide file tree
Showing 16 changed files with 0 additions and 109 deletions.
10 changes: 0 additions & 10 deletions projects/sdk/src/lib/farm/actions/AddLiquidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ export class AddLiquidity extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext): Promise<Step<BasicPreparedResult>> {
AddLiquidity.sdk.debug(`[${this.name}.run()]`, {
pool: this._pool,
registry: this._registry,
amounts: this._amounts,
amountInStep: _amountInStep,
fromMode: this._fromMode,
toMode: this._toMode,
context
});

if (context.runMode === RunMode.EstimateReversed) {
throw new Error("Reverse estimation is not yet supported for this action");
}
Expand Down
5 changes: 0 additions & 5 deletions projects/sdk/src/lib/farm/actions/ClaimWithdrawal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ export class ClaimWithdrawal extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
ClaimWithdrawal.sdk.debug(`[${this.name}.run()]`, {
tokenIn: this._tokenIn,
seasons: this._season,
to: this._to
});
return {
name: this.name,
amountOut: _amountInStep,
Expand Down
5 changes: 0 additions & 5 deletions projects/sdk/src/lib/farm/actions/ClaimWithdrawals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ export class ClaimWithdrawals extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
ClaimWithdrawals.sdk.debug(`[${this.name}.run()]`, {
tokenIn: this._tokenIn,
seasons: this._seasons,
to: this._to
});
return {
name: this.name,
amountOut: _amountInStep,
Expand Down
6 changes: 0 additions & 6 deletions projects/sdk/src/lib/farm/actions/Deposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ export class Deposit extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
Deposit.sdk.debug(`[${this.name}.run()]`, {
token: this.token.symbol,
amountInStep: _amountInStep,
fromMode: this.fromMode,
context
});
return {
name: this.name,
amountOut: _amountInStep,
Expand Down
10 changes: 0 additions & 10 deletions projects/sdk/src/lib/farm/actions/Exchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@ export class Exchange extends StepClass implements StepClass<BasicPreparedResult
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
Exchange.sdk.debug(`>[${this.name}.run()]`, {
pool: this.pool,
registry: this.registry,
tokenIn: this.tokenIn.symbol,
tokenOut: this.tokenOut.symbol,
amountInStep: _amountInStep,
fromMode: this.fromMode,
toMode: this.toMode,
context
});
const [tokenIn, tokenOut] = Workflow.direction(
this.tokenIn,
this.tokenOut,
Expand Down
9 changes: 0 additions & 9 deletions projects/sdk/src/lib/farm/actions/ExchangeUnderlying.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ export class ExchangeUnderlying extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
ExchangeUnderlying.sdk.debug(`>[${this.name}.run()]`, {
pool: this.pool,
tokenIn: this.tokenIn.symbol,
tokenOut: this.tokenOut.symbol,
amountInStep: _amountInStep,
fromMode: this.fromMode,
toMode: this.toMode,
context
});
const [tokenIn, tokenOut] = Workflow.direction(
this.tokenIn,
this.tokenOut,
Expand Down
10 changes: 0 additions & 10 deletions projects/sdk/src/lib/farm/actions/RemoveLiquidityOneToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ export class RemoveLiquidityOneToken extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
RemoveLiquidityOneToken.sdk.debug(`[${this.name}.run()]`, {
pool: this._pool,
registry: this._registry,
tokenOut: this._tokenOut,
amountInStep: _amountInStep,
fromMode: this._fromMode,
toMode: this._toMode,
context
});

if (context.runMode === RunMode.EstimateReversed) {
throw new Error("Reverse estimation is not yet supported for this action");
}
Expand Down
7 changes: 0 additions & 7 deletions projects/sdk/src/lib/farm/actions/TransferDeposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ export class TransferDeposit extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
TransferDeposit.sdk.debug(`[${this.name}.run()]`, {
signer: this._signer,
to: this._to,
tokenIn: this._tokenIn,
season: this._season,
amount: this._amount
});
return {
name: this.name,
amountOut: _amountInStep,
Expand Down
7 changes: 0 additions & 7 deletions projects/sdk/src/lib/farm/actions/TransferDeposits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ export class TransferDeposits extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
TransferDeposits.sdk.debug(`[${this.name}.run()]`, {
signer: this._signer,
to: this._to,
tokenIn: this._tokenIn,
seasons: this._seasons,
amounts: this._amounts
});
return {
name: this.name,
amountOut: _amountInStep,
Expand Down
8 changes: 0 additions & 8 deletions projects/sdk/src/lib/farm/actions/TransferToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ export class TransferToken extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
TransferToken.sdk.debug(`[${this.name}.run()]`, {
tokenIn: this._tokenIn,
recipient: this._recipient,
amountInStep: _amountInStep,
fromMode: this._fromMode,
toMode: this._toMode
});

return {
name: this.name,
amountOut: _amountInStep, // transfer exact amount
Expand Down
1 change: 0 additions & 1 deletion projects/sdk/src/lib/farm/actions/UnwrapEth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export class UnwrapEth extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
UnwrapEth.sdk.debug(`[${this.name}.run()]`, { fromMode: this.fromMode, _amountInStep, context });
return {
name: this.name,
amountOut: _amountInStep, // amountInStep should be an amount of ETH.
Expand Down
10 changes: 0 additions & 10 deletions projects/sdk/src/lib/farm/actions/WellShift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ export class WellShift extends StepClass<AdvancedPipePreparedResult> {

const reversed = context.runMode === RunMode.EstimateReversed;

WellShift.sdk.debug(`>[${this.name}.run()]`, {
well: well.name,
wellAddress: this.wellAddress,
toToken: this.toToken.symbol,
amountInStep: _amountInStep,
recipient: this.recipient,
reversed,
context
});

if (reversed) {
throw new Error("Reverse direction is not supported by shift()");
}
Expand Down
10 changes: 0 additions & 10 deletions projects/sdk/src/lib/farm/actions/WellSwap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ export class WellSwap extends StepClass<AdvancedPipePreparedResult> {
await well.getName();
} catch (err) {}
const reversed = context.runMode === RunMode.EstimateReversed;
WellSwap.sdk.debug(`>[${this.name}.run()]`, {
wellName: well.name,
wellAddress: this.wellAddress,
fromToken: this.fromToken.symbol,
toToken: this.toToken.symbol,
amountInStep: _amountInStep,
recipient: this.recipient,
reversed,
context
});

// Run estimate to calculate amountOut
let estimate: TokenValue;
Expand Down
5 changes: 0 additions & 5 deletions projects/sdk/src/lib/farm/actions/WithdrawDeposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ export class WithdrawDeposit extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
WithdrawDeposit.sdk.debug(`[${this.name}.run()]`, {
tokenIn: this._tokenIn,
stem: this._stem,
amount: this._amount
});
return {
name: this.name,
amountOut: _amountInStep,
Expand Down
5 changes: 0 additions & 5 deletions projects/sdk/src/lib/farm/actions/WithdrawDeposits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ export class WithdrawDeposits extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
WithdrawDeposits.sdk.debug(`[${this.name}.run()]`, {
tokenIn: this._tokenIn,
stems: this._stems,
amounts: this._amounts
});
return {
name: this.name,
amountOut: _amountInStep,
Expand Down
1 change: 0 additions & 1 deletion projects/sdk/src/lib/farm/actions/WrapEth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export class WrapEth extends StepClass<BasicPreparedResult> {
}

async run(_amountInStep: ethers.BigNumber, context: RunContext) {
WrapEth.sdk.debug(`>[${this.name}.run()]`, { toMode: this.toMode, _amountInStep, context });
return {
name: this.name,
amountOut: _amountInStep, // amountInStep should be an amount of ETH.
Expand Down

0 comments on commit 13db5b4

Please sign in to comment.