Fix typos

This commit is contained in:
David Racero 2020-11-06 12:14:41 +01:00
parent b5f2f283a2
commit ef9e32f13b

View File

@ -7,13 +7,12 @@ import {
ICommonConfiguration, ICommonConfiguration,
eEthereumNetwork, eEthereumNetwork,
} from './types'; } from './types';
import {getParamPerPool} from './contracts-helpers'; import {getParamPerPool} from './contracts-helpers';
import {AaveConfig} from '../config/aave'; import {AaveConfig} from '../config/aave';
import {UniswapConfig} from '../config/uniswap'; import {UniswapConfig} from '../config/uniswap';
import {CommonsConfig} from '../config/commons'; import {CommonsConfig} from '../config/commons';
import {ZERO_ADDRESS} from './constants'; import {ZERO_ADDRESS} from './constants';
import {DRE} from './misc-utils'; import {BRE} from './misc-utils';
import {tEthereumAddress} from './types'; import {tEthereumAddress} from './types';
import {getParamPerNetwork} from './contracts-helpers'; import {getParamPerNetwork} from './contracts-helpers';
import {deployWETHMocked} from './contracts-deployments'; import {deployWETHMocked} from './contracts-deployments';
@ -58,7 +57,7 @@ export const getFeeDistributionParamsCommon = (
receiver: tEthereumAddress receiver: tEthereumAddress
): iBasicDistributionParams => { ): iBasicDistributionParams => {
const receivers = [receiver, ZERO_ADDRESS]; const receivers = [receiver, ZERO_ADDRESS];
const percentages = ['200:0', '8000']; const percentages = ['2000', '8000'];
return { return {
receivers, receivers,
percentages, percentages,
@ -66,26 +65,26 @@ export const getFeeDistributionParamsCommon = (
}; };
export const getGenesisPoolAdmin = async (config: ICommonConfiguration) => { export const getGenesisPoolAdmin = async (config: ICommonConfiguration) => {
const currentNetwork = DRE.network.name; const currentNetwork = BRE.network.name;
const targetAddress = getParamPerNetwork(config.PoolAdmin, <eEthereumNetwork>currentNetwork); const targetAddress = getParamPerNetwork(config.PoolAdmin, <eEthereumNetwork>currentNetwork);
if (targetAddress) { if (targetAddress) {
return targetAddress; return targetAddress;
} }
const addressList = await Promise.all( const addressList = await Promise.all(
(await DRE.ethers.getSigners()).map((signer) => signer.getAddress()) (await BRE.ethers.getSigners()).map((signer) => signer.getAddress())
); );
const addressIndex = config.PoolAdminIndex; const addressIndex = config.PoolAdminIndex;
return addressList[addressIndex]; return addressList[addressIndex];
}; };
export const getEmergencyAdmin = async (config: ICommonConfiguration) => { export const getEmergencyAdmin = async (config: ICommonConfiguration) => {
const currentNetwork = DRE.network.name; const currentNetwork = BRE.network.name;
const targetAddress = getParamPerNetwork(config.EmergencyAdmin, <eEthereumNetwork>currentNetwork); const targetAddress = getParamPerNetwork(config.EmergencyAdmin, <eEthereumNetwork>currentNetwork);
if (targetAddress) { if (targetAddress) {
return targetAddress; return targetAddress;
} }
const addressList = await Promise.all( const addressList = await Promise.all(
(await DRE.ethers.getSigners()).map((signer) => signer.getAddress()) (await BRE.ethers.getSigners()).map((signer) => signer.getAddress())
); );
const addressIndex = config.EmergencyAdminIndex; const addressIndex = config.EmergencyAdminIndex;
return addressList[addressIndex]; return addressList[addressIndex];
@ -97,16 +96,14 @@ export const getATokenDomainSeparatorPerNetwork = (
): tEthereumAddress => getParamPerNetwork<tEthereumAddress>(config.ATokenDomainSeparator, network); ): tEthereumAddress => getParamPerNetwork<tEthereumAddress>(config.ATokenDomainSeparator, network);
export const getWethAddress = async (config: ICommonConfiguration) => { export const getWethAddress = async (config: ICommonConfiguration) => {
const currentNetwork = DRE.network.name; const currentNetwork = BRE.network.name;
const wethAddress = getParamPerNetwork(config.WETH, <eEthereumNetwork>currentNetwork); const wethAddress = getParamPerNetwork(config.WETH, <eEthereumNetwork>currentNetwork);
if (wethAddress) { if (wethAddress) {
console.log('here', wethAddress);
return wethAddress; return wethAddress;
} }
if (currentNetwork.includes('main')) { if (currentNetwork.includes('main')) {
throw new Error('WETH not set at mainnet configuration.'); throw new Error('WETH not set at mainnet configuration.');
} }
const weth = await deployWETHMocked(); const weth = await deployWETHMocked();
console.log('here2');
return weth.address; return weth.address;
}; };