diff --git a/src/components/actions/ActionHandler.tsx b/src/components/actions/ActionHandler.tsx index e7b7830..e928333 100644 --- a/src/components/actions/ActionHandler.tsx +++ b/src/components/actions/ActionHandler.tsx @@ -259,7 +259,7 @@ export default function ActionHandler({ actionType, tokenType }: ActionHandlerPr if (isMaxSelected && (actionType === 'redeem' || actionType === 'withdraw')) { const maxBeforeTx = await refetchMaxBeforeTx(); - if (!maxBeforeTx) { + if (maxBeforeTx === undefined) { setError('Error refetching max amount before tx.'); console.error('Error refetching max amount before tx.'); return; diff --git a/src/components/actions/SafeActionHandler.tsx b/src/components/actions/SafeActionHandler.tsx index 4e54de9..606361a 100644 --- a/src/components/actions/SafeActionHandler.tsx +++ b/src/components/actions/SafeActionHandler.tsx @@ -386,7 +386,7 @@ export default function SafeActionHandler({ actionType, tokenType }: SafeActionH if (isMaxSelected && (actionType === 'redeem' || actionType === 'withdraw')) { const maxBeforeTx = await refetchMaxBeforeTx(); - if (!maxBeforeTx) { + if (maxBeforeTx === undefined) { setError('Error refetching max amount before tx.'); console.error('Error refetching max amount before tx.'); setLoading(false); @@ -464,4 +464,3 @@ export default function SafeActionHandler({ actionType, tokenType }: SafeActionH /> ); } - diff --git a/src/components/vault/Auction.tsx b/src/components/vault/Auction.tsx index c406a72..d379b44 100644 --- a/src/components/vault/Auction.tsx +++ b/src/components/vault/Auction.tsx @@ -132,7 +132,7 @@ export default function Auction() { // Calculate auction progress const calculateAuctionProgress = () => { - if (!auctionStartBlock || !currentBlock || !auctionDuration || auctionStartBlock === 0n) { + if (auctionStartBlock === null || !currentBlock || !auctionDuration || auctionStartBlock === 0n) { return { progress: 0, currentStep: 0, isComplete: false }; } @@ -208,8 +208,8 @@ export default function Auction() {