Skip to content

Commit

Permalink
wallet arg
Browse files Browse the repository at this point in the history
  • Loading branch information
ewansheldon committed Nov 13, 2023
1 parent e9be421 commit e9fceec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/liquidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ const { getContract } = require("./contractFactory");
const { ethers } = require('ethers');
const { getNetwork } = require('./networks');

const getVaultSupply = async wallet => {
const getVaultSupply = async (manager, wallet) => {
try {
return await manager.connect(wallet).totalSupply()
return await manager.connect(wallet).totalSupply();
} catch (_) {
return await getVaultSupply(wallet);
}
Expand All @@ -29,7 +29,7 @@ const scheduleLiquidation = async _ => {
console.log(`liquidation attempt failed`);
}
tokenId++;
if (tokenId > await getVaultSupply(wallet)) tokenId = 1;
if (tokenId > await getVaultSupply(manager, wallet)) tokenId = 1;
running = false;
}
});
Expand Down

0 comments on commit e9fceec

Please sign in to comment.