Fixed missing "waitForTx"

This commit is contained in:
Zer0dot 2021-02-18 16:50:15 -05:00
parent a0dbf13d60
commit f44879e625

View File

@ -48,23 +48,17 @@ task('full:deploy-oracles', 'Deploy oracles for dev enviroment')
}; };
const [tokens, aggregators] = getPairsTokenAggregator(tokensToWatch, chainlinkAggregators); const [tokens, aggregators] = getPairsTokenAggregator(tokensToWatch, chainlinkAggregators);
// const aaveOracle = notFalsyOrZeroAddress(aaveOracleAddress)
// ? await getAaveOracle(aaveOracleAddress)
// : await deployAaveOracle(
// [tokens, aggregators, fallbackOracleAddress, await getWethAddress(poolConfig)],
// verify
// );
let aaveOracle: AaveOracle; let aaveOracle: AaveOracle;
if (notFalsyOrZeroAddress(aaveOracleAddress)) { if (notFalsyOrZeroAddress(aaveOracleAddress)) {
aaveOracle = await getAaveOracle(aaveOracleAddress); aaveOracle = await getAaveOracle(aaveOracleAddress);
await aaveOracle.setAssetSources(tokens, aggregators); await waitForTx(await aaveOracle.setAssetSources(tokens, aggregators));
} else { } else {
aaveOracle = await deployAaveOracle( aaveOracle = await deployAaveOracle(
[tokens, aggregators, fallbackOracleAddress, await getWethAddress(poolConfig)], [tokens, aggregators, fallbackOracleAddress, await getWethAddress(poolConfig)],
verify verify
); );
} }
const lendingRateOracle = notFalsyOrZeroAddress(lendingRateOracleAddress) const lendingRateOracle = notFalsyOrZeroAddress(lendingRateOracleAddress)
? await getLendingRateOracle(lendingRateOracleAddress) ? await getLendingRateOracle(lendingRateOracleAddress)
: await deployLendingRateOracle(verify); : await deployLendingRateOracle(verify);