mirror of
https://github.com/Instadapp/Gelato-automations.git
synced 2024-07-29 22:28:07 +00:00
9 lines
333 B
JavaScript
9 lines
333 B
JavaScript
module.exports = async function (token, tokenDebtToMove, instaPoolResolver) {
|
|
const rData = await instaPoolResolver.getTokenLimit(token);
|
|
|
|
if (rData.dydx > tokenDebtToMove) return 0;
|
|
if (rData.maker > tokenDebtToMove) return 1;
|
|
if (rData.compound > tokenDebtToMove) return 2;
|
|
if (rData.aave > tokenDebtToMove) return 3;
|
|
};
|