Skip to content

Commit

Permalink
Merge branch 'RC11' into RC10
Browse files Browse the repository at this point in the history
  • Loading branch information
brucedonovan authored Sep 18, 2021
2 parents 4c6c15d + 3ede98e commit d149eac
Show file tree
Hide file tree
Showing 10 changed files with 324 additions and 515 deletions.
4 changes: 3 additions & 1 deletion src/contexts/UserContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,13 @@ const UserProvider = ({ children }: any) => {
_publicData = await Promise.all(
strategyList.map(async (_strategy: IStrategyRoot): Promise<IStrategy> => {
/* Get all the data simultanenously in a promise.all */
const [strategyTotalSupply, currentSeriesId, currentPoolAddr, nextSeriesId] = await Promise.all([
const [strategyTotalSupply, currentSeriesId, currentPoolAddr, nextSeriesId, ] = await Promise.all([
_strategy.strategyContract.totalSupply(),
_strategy.strategyContract.seriesId(),
_strategy.strategyContract.pool(),
_strategy.strategyContract.nextSeriesId(),
]);
const currentInvariant = await _strategy.strategyContract.invariants(currentPoolAddr);

if (seriesRootMap.has(currentSeriesId)) {
const currentSeries = seriesRootMap.get(currentSeriesId);
Expand All @@ -505,6 +506,7 @@ const UserProvider = ({ children }: any) => {
nextSeriesId,
currentSeries,
nextSeries,
currentInvariant,
active: true,
};
}
Expand Down
Loading

0 comments on commit d149eac

Please sign in to comment.