Commit 76e3caa6 authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

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

parent 7fa91d14
...@@ -69,7 +69,6 @@ export const useBag = create<BagState>()( ...@@ -69,7 +69,6 @@ export const useBag = create<BagState>()(
itemsInBag: [], itemsInBag: [],
setItemsInBag: (items) => setItemsInBag: (items) =>
set(({ bagManuallyClosed }) => ({ set(({ bagManuallyClosed }) => ({
bagManuallyClosed: items.length === 0 ? false : bagManuallyClosed,
itemsInBag: items, itemsInBag: items,
})), })),
totalEthPrice: BigNumber.from(0), totalEthPrice: BigNumber.from(0),
...@@ -131,7 +130,6 @@ export const useBag = create<BagState>()( ...@@ -131,7 +130,6 @@ export const useBag = create<BagState>()(
) )
) )
return { return {
bagManuallyClosed: itemsCopy.length === 0 ? false : bagManuallyClosed,
itemsInBag: itemsCopy, itemsInBag: itemsCopy,
usedSweep: fromSweep, usedSweep: fromSweep,
bagExpanded: itemsCopy.length !== 0, bagExpanded: itemsCopy.length !== 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment