Skip to content

Commit

Permalink
Fix sell order when 0 donkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
bob0005 committed Dec 20, 2024
1 parent 3f30256 commit f877171
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/ui/components/trading/MarketOrderPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ const OrderRow = memo(
<ConfirmationPopup
title="Confirm Trade"
onConfirm={onAccept}
disabled={donkeysNeeded > donkeyBalance || donkeyBalance === 0}
disabled={!isBuy && donkeysNeeded > donkeyBalance}
onCancel={() => {
setConfirmOrderModal(false);
}}
Expand Down Expand Up @@ -600,7 +600,7 @@ const OrderCreation = memo(

const enoughDonkeys = useMemo(() => {
if (resourceId === ResourcesIds.Donkey) return true;
return donkeyBalance > donkeysNeeded;
return donkeyBalance >= donkeysNeeded;
}, [donkeyBalance, donkeysNeeded, resourceId]);

return (
Expand Down

0 comments on commit f877171

Please sign in to comment.