placeBets: handle old contracts

This commit is contained in:
mantikoros 2021-12-15 16:57:16 -06:00
parent f32933f668
commit 15b11d30a3

View File

@ -82,6 +82,7 @@ const getNewBetInfo = (
: (amount * yesPot ** 2) / (noPot ** 2 + amount * noPot) : (amount * yesPot ** 2) / (noPot ** 2 + amount * noPot)
const { YES: yesWeight, NO: noWeight } = contract.dpmWeights const { YES: yesWeight, NO: noWeight } = contract.dpmWeights
|| { YES: 0, NO: 0 } // only nesc for old contracts
const newDpmWeights = const newDpmWeights =
outcome === 'YES' outcome === 'YES'