fix(bag): don't close when the user switches pages (#5133)

This commit is contained in:
Jordan Frankfurt 2022-11-08 18:47:01 -06:00 committed by GitHub
parent 99f3998941
commit 9a38c4e58d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -223,11 +223,6 @@ const Bag = () => {
if (bagIsLocked && !isOpen) setModalIsOpen(true)
}, [bagIsLocked, isOpen])
useEffect(() => {
setBagExpanded({ bagExpanded: false })
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [pathname])
useEffect(() => {
if (transactionStateRef.current === TxStateType.Confirming) setBagStatus(BagStatus.PROCESSING_TRANSACTION)
if (transactionStateRef.current === TxStateType.Denied || transactionStateRef.current === TxStateType.Invalid) {