Merge branch '122-remove-setreservedecimals-from-lendingpoolconfiguration' into 'master'

Resolve "Remove setReserveDecimals() from lendingPoolConfigurator"

Closes #122

See merge request aave-tech/protocol-v2!140
This commit is contained in:
Ernesto Boado 2020-11-10 13:03:48 +00:00
commit ce62734786
2 changed files with 0 additions and 33 deletions

View File

@ -554,21 +554,6 @@ contract LendingPoolConfigurator is VersionedInitializable {
emit ReserveLiquidationBonusChanged(asset, bonus);
}
/**
* @dev updates the reserve decimals
* @param asset the address of the reserve
* @param decimals the new number of decimals
**/
function setReserveDecimals(address asset, uint256 decimals) external onlyPoolAdmin {
ReserveConfiguration.Map memory currentConfig = pool.getConfiguration(asset);
currentConfig.setDecimals(decimals);
pool.setConfiguration(asset, currentConfig.data);
emit ReserveDecimalsChanged(asset, decimals);
}
/**
* @dev sets the interest rate strategy of a reserve
* @param asset the address of the reserve

View File

@ -48,16 +48,6 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
).to.be.revertedWith(RC_INVALID_LIQ_BONUS);
});
it('Reverts trying to set an invalid reserve decimals', async () => {
const {configurator, weth} = testEnv;
const invalidDecimals = 256;
await expect(configurator.setReserveDecimals(weth.address, invalidDecimals)).to.be.revertedWith(
RC_INVALID_DECIMALS
);
});
it('Reverts trying to set an invalid reserve factor', async () => {
const {configurator, weth} = testEnv;
@ -508,14 +498,6 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
).to.be.revertedWith(CALLER_NOT_POOL_ADMIN);
});
it('Check the onlyAaveAdmin on setReserveDecimals', async () => {
const {configurator, users, weth} = testEnv;
await expect(
configurator.connect(users[2].signer).setReserveDecimals(weth.address, '80'),
CALLER_NOT_POOL_ADMIN
).to.be.revertedWith(CALLER_NOT_POOL_ADMIN);
});
it('Check the onlyAaveAdmin on setLiquidationBonus', async () => {
const {configurator, users, weth} = testEnv;
await expect(