Use ethers.js V6 and simplify functions #1
@ -46,7 +46,7 @@ export class TokenPriceOracle {
|
||||
return prices.reduce((acc, price, index) => {
|
||||
const tokenPriceInwei = (price * BigInt(10 ** tokens[index].decimals)) / BigInt(10 ** 18);
|
||||
|
||||
acc[tokens[index].symbol] = tokenPriceInwei.toString();
|
||||
acc[tokens[index].symbol.toLowerCase()] = tokenPriceInwei.toString();
|
||||
|
||||
return acc;
|
||||
}, {} as TokenPrices);
|
||||
|
Loading…
Reference in New Issue
Block a user