Skip to content

Commit

Permalink
fix: lint was unhappy with the types on an array of mixed promises
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Hibbert committed Sep 3, 2020
1 parent a6efdab commit 276e5fe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/zoe/src/contracts/multipoolAutoswap/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,11 @@ export const makeAddPool = (zcf, isSecondary, initPool, centralBrand) => {
const liquidityKeyword = `${keyword}Liquidity`;
zcf.assertUniqueKeyword(liquidityKeyword);

const secondaryBrandP = E(secondaryIssuer).getBrand();
const secondaryMathKindP = E(secondaryIssuer).getAmountMathKind();
const promises = [secondaryMathKindP, secondaryBrandP];
const [secondaryMathKind, secondaryBrand] = await Promise.all(promises);
const [secondaryMathKind, secondaryBrand] = await Promise.all([
E(secondaryIssuer).getAmountMathKind(),
E(secondaryIssuer).getBrand(),
]);

assert(
!isSecondary(secondaryBrand),
details`issuer ${secondaryIssuer} already has a pool`,
Expand Down

0 comments on commit 276e5fe

Please sign in to comment.