Skip to content

Commit

Permalink
Merge pull request #183 from notional-finance/fix-liquidation-bot-linter
Browse files Browse the repository at this point in the history
fix: liquidation bot linter errors
  • Loading branch information
weitianjie2000 authored Jun 13, 2023
2 parents dfdefd2 + a0ca055 commit 695303e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions apps/liquidation-bot/bindings.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Define any bindings for getMiniflareBindings to return for typed
// integration tests
interface Bindings {
// Example:
// NAME: DurableObjectNamespace;
ACCOUNT_CACHE: DurableObjectNamespace;
}
4 changes: 2 additions & 2 deletions apps/liquidation-bot/src/NotionalV3Liquidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default class NotionalV3Liquidator {
).gt(this.settings.dustThreshold)
);

return accounts.map((a, i) => {
return accounts.map((a) => {
const netUnderlyingAvailable = new Map<number, BigNumber>();
const balances = results[`${a.id}:account`][1].filter((b) => b[0] !== 0);
const portfolio = results[`${a.id}:account`][2];
Expand Down Expand Up @@ -192,7 +192,7 @@ export default class NotionalV3Liquidator {

return await this.profitCalculator.sortByProfitability(
liquidations
.map((liq, i) => ({
.map((liq) => ({
accountId: ra.id,
liquidation: liq,
flashLoanAmount: this.toExternal(
Expand Down
4 changes: 2 additions & 2 deletions apps/liquidation-bot/src/ProfitCalculator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BigNumber, Contract, ethers } from 'ethers';
import { BigNumber, Contract } from 'ethers';
import {
AccountLiquidation,
CurrencyOverride,
Expand Down Expand Up @@ -38,7 +38,7 @@ export default class ProfitCalculator {
to: string,
amount: BigNumber,
exactIn: boolean
): Promise<any> {
): Promise<unknown> {
const queryParams = new URLSearchParams({
sellToken: from,
buyToken: to,
Expand Down
5 changes: 2 additions & 3 deletions apps/liquidation-bot/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
} from '@notional-finance/util';
import { BigNumber } from 'ethers';
import {
DDSeries,
initEventLogger,
initMetricLogger,
submitMetrics,
Expand Down Expand Up @@ -176,7 +175,7 @@ export default {
async fetch(
request: Request,
env: Env,
ctx: ExecutionContext
_: ExecutionContext
): Promise<Response> {
try {
await run(env);
Expand All @@ -191,7 +190,7 @@ export default {
async scheduled(
controller: ScheduledController,
env: Env,
ctx: ExecutionContext
_: ExecutionContext
): Promise<void> {
try {
await run(env);
Expand Down

0 comments on commit 695303e

Please sign in to comment.