Skip to content

Commit

Permalink
fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
0xCactus committed Aug 7, 2023
1 parent bf94e5a commit 0e41b4e
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 93 deletions.
2 changes: 1 addition & 1 deletion liquidator/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
plugins: ['@typescript-eslint', 'react', 'import'],
extends: [
'eslint:recommended',
'airbnb-typescript',
Expand Down
13 changes: 7 additions & 6 deletions liquidator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"bs58": "^4.0.1",
"buffer-layout": "^1.2.1",
"dotenv": "^10.0.0",
"eslint-config-airbnb": "^19.0.4",
"ggoldca-sdk": "^0.0.17",
"got": "^9.6.0",
"hot-shots": "^8.5.0",
Expand All @@ -53,12 +54,12 @@
"devDependencies": {
"@types/jest": "^24.9.1",
"@types/node": "^14.0.14",
"@typescript-eslint/eslint-plugin": "^3.10.1",
"@typescript-eslint/parser": "^3.10.1",
"eslint": "^5.16.0",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"eslint": "^8.46.0",
"eslint-config-airbnb-base": "^13.2.0",
"eslint-config-airbnb-typescript": "^8.0.2",
"eslint-plugin-import": "^2.18.2",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-jest": "^22.21.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.20.0",
Expand All @@ -68,6 +69,6 @@
"nodemon": "^1.19.4",
"supertest": "^4.0.2",
"ts-jest": "^26.3.0",
"typescript": "^4.4.4"
"typescript": "^5.1.6"
}
}
4 changes: 2 additions & 2 deletions liquidator/src/libs/rebalanceWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export async function rebalanceWallet(connection, payer, jupiter, tokensOracle,
function aggregateInfo(tokensOracle, walletBalances, connection, wallet, target) {
const info: any = [];
target.forEach(async (tokenDistribution: TokenCount) => {
const { symbol, target } = tokenDistribution;
const { symbol, target: tokenTarget } = tokenDistribution;
const tokenOracle = findWhere(tokensOracle, { symbol });
const walletBalance = findWhere(walletBalances, { symbol });

Expand All @@ -90,7 +90,7 @@ function aggregateInfo(tokensOracle, walletBalances, connection, wallet, target)
const usdValue = new BigNumber(walletBalance.balance).multipliedBy(tokenOracle.price);
info.push({
symbol,
target,
target: tokenTarget,
mintAddress: tokenOracle.mintAddress,
ata: walletBalance.ata?.toString(),
balance: walletBalance.balance,
Expand Down
2 changes: 1 addition & 1 deletion liquidator/src/libs/refreshObligation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function calculateRefreshedObligation(
mintAddress,
marketValue,
symbol,
addedBorrowWeightBPS: reserve.config.addedBorrowWeightBPS
addedBorrowWeightBPS: reserve.config.addedBorrowWeightBPS,
});
});

Expand Down
Loading

0 comments on commit 0e41b4e

Please sign in to comment.