fix: keep bag closed after manual close (#5429)

This commit is contained in:
Vignesh Mohankumar 2022-11-29 11:13:47 -05:00 committed by GitHub
parent 7fa91d1442
commit 76e3caa659
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -69,7 +69,6 @@ export const useBag = create<BagState>()(
itemsInBag: [],
setItemsInBag: (items) =>
set(({ bagManuallyClosed }) => ({
bagManuallyClosed: items.length === 0 ? false : bagManuallyClosed,
itemsInBag: items,
})),
totalEthPrice: BigNumber.from(0),
@ -131,7 +130,6 @@ export const useBag = create<BagState>()(
)
)
return {
bagManuallyClosed: itemsCopy.length === 0 ? false : bagManuallyClosed,
itemsInBag: itemsCopy,
usedSweep: fromSweep,
bagExpanded: itemsCopy.length !== 0,