Fix broken warmup function error handling
This commit is contained in:
parent
61da821b59
commit
b9f64738b5
|
@ -215,7 +215,7 @@ function BuyPanel(props: {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// warm up cloud function
|
// warm up cloud function
|
||||||
placeBet({}).catch()
|
placeBet({}).catch(() => {})
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
@ -553,7 +553,10 @@ function BetRow(props: { bet: Bet; contract: Contract; saleBet?: Bet }) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const warmUpSellBet = _.throttle(() => sellBet({}).catch(), 5000 /* ms */)
|
const warmUpSellBet = _.throttle(
|
||||||
|
() => sellBet({}).catch(() => {}),
|
||||||
|
5000 /* ms */
|
||||||
|
)
|
||||||
|
|
||||||
function SellButton(props: { contract: Contract; bet: Bet }) {
|
function SellButton(props: { contract: Contract; bet: Bet }) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
@ -20,7 +20,7 @@ export function ResolutionPanel(props: {
|
||||||
}) {
|
}) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// warm up cloud function
|
// warm up cloud function
|
||||||
resolveMarket({} as any).catch()
|
resolveMarket({} as any).catch(() => {})
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const { contract, className } = props
|
const { contract, className } = props
|
||||||
|
|
|
@ -61,7 +61,7 @@ export function NewContract(props: { question: string; tag?: string }) {
|
||||||
}, [creator])
|
}, [creator])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
createContract({}).catch() // warm up function
|
createContract({}).catch(() => {}) // warm up function
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const [outcomeType, setOutcomeType] = useState<outcomeType>('BINARY')
|
const [outcomeType, setOutcomeType] = useState<outcomeType>('BINARY')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user