add mintedCoin field

This commit is contained in:
slasher125
2022-10-28 18:56:52 +02:00
parent a5b703d02d
commit aedbca97a9
5 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
exports.up = (pgm) => {
pgm.addColumns('config', {
mintedCoin: 'text',
});
};

View File

@@ -75,6 +75,7 @@ const main = async () => {
totalSupplyUsd: (Number(troveEthTvl) / 1e18) * Number(troveType.price),
totalBorrowUsd: totalSupplyUsd,
ltv: 1 / (mcr / 1e18),
mintedCoin: 'LUSD',
},
];
};

View File

@@ -29,6 +29,7 @@ describe(`Running ${process.env.npm_config_adapter} Test`, () => {
'ltv',
'borrowable',
'debtCeilingUsd',
'mintedCoin',
];
const fields = [...Object.keys(baseFields), ...optionalFields, 'tvlUsd'];
apy.forEach((pool) => {

View File

@@ -102,6 +102,7 @@ const buildInsertConfigQuery = (payload) => {
'url',
{ name: 'ltv', def: null },
{ name: 'borrowable', def: null },
{ name: 'mintedCoin', def: null },
];
const cs = new pgp.helpers.ColumnSet(columns, { table: tableName });
const query =

View File

@@ -249,6 +249,7 @@ const getYieldLendBorrow = async () => {
"debtCeilingUsd",
"ltv",
"borrowable",
"mintedCoin",
"rewardTokens",
"underlyingTokens"
FROM