Fix broken contract fetching in user bets list
This commit is contained in:
parent
a85ec472b9
commit
45ffd5a1cc
|
@ -86,8 +86,8 @@ export function BetsList(props: { user: User }) {
|
|||
|
||||
useEffect(() => {
|
||||
if (bets) {
|
||||
const contractIds = uniq(bets.map((b) => getContractFromId(b.contractId)))
|
||||
Promise.all(contractIds).then((contracts) => {
|
||||
const contractIds = uniq(bets.map((b) => b.contractId))
|
||||
Promise.all(contractIds.map(getContractFromId)).then((contracts) => {
|
||||
setContractsById(keyBy(filterDefined(contracts), 'id'))
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user