Skip to content

Commit

Permalink
workaround for race condition causing crash/white page on the account…
Browse files Browse the repository at this point in the history
… page (Uniswap#348)

* workaround for race condition causing crash/white page on the account page

* Fix code style issues with ESLint

Co-authored-by: Lint Action <[email protected]>
  • Loading branch information
metjm and lint-action authored Mar 19, 2021
1 parent f10f94e commit c7f6b55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/MiningPositionList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function MiningPositionList({ miningPositions }) {
}, [miningPositions])

const ListItem = ({ miningPosition, index }) => {
if (!miningPosition.pairData) return null
const pairPercentage = miningPosition.balance / miningPosition.pairData.totalSupply
const valueUSD = miningPosition.pairData.reserveUSD
const valueFirstPair = miningPosition.pairData.reserve0
Expand Down
2 changes: 1 addition & 1 deletion src/utils/returns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export async function getHistoricalPairReturns(startDateTimestamp, currentPairDa

const shareValues = await getShareValueOverTime(currentPairData.id, dayTimestamps)
const shareValuesFormatted = {}
shareValues?.map((share) => {
shareValues.map((share) => {
shareValuesFormatted[share.timestamp] = share
})

Expand Down

0 comments on commit c7f6b55

Please sign in to comment.