Fix LP market asset mismatch

This commit is contained in:
Zer0dot 2021-02-08 10:38:14 -05:00
parent 01a662680f
commit e5274928cc
2 changed files with 5 additions and 1 deletions

View File

@ -137,7 +137,7 @@ export async function initializeMakeSuite() {
const daiAddress = reservesTokens.find((token) => token.symbol === 'UniDAI')?.tokenAddress;
const usdcAddress = reservesTokens.find((token) => token.symbol === 'UniUSDC')?.tokenAddress;
const aaveAddress = reservesTokens.find((token) => token.symbol === 'UniAAVEWETH')?.tokenAddress;
const wethAddress = reservesTokens.find((token) => token.symbol === 'UniWETH')?.tokenAddress;
const wethAddress = reservesTokens.find((token) => token.symbol === 'WETH')?.tokenAddress;
if (!aDaiAddress || !aWEthAddress) {
process.exit(1);

View File

@ -1237,6 +1237,10 @@ export const calcExpectedInterestRates = (
): BigNumber[] => {
const { reservesParams } = configuration;
// Fixes WETH - UniWETH mock token symbol mismatch
if(reserveSymbol === 'WETH') {
reserveSymbol = 'UniWETH';
}
const reserveIndex = Object.keys(reservesParams).findIndex((value) => value === reserveSymbol);
const [, reserveConfiguration] = (Object.entries(reservesParams) as [string, IReserveParams][])[
reserveIndex