diff --git a/src/components/bidpage/BidForm.js b/src/components/bidpage/BidForm.js index e4f8c55..e281530 100644 --- a/src/components/bidpage/BidForm.js +++ b/src/components/bidpage/BidForm.js @@ -163,15 +163,18 @@ const BidForm = ({ props }) => { onTxSubmitted(msg); // resetFormInputs(); setPlacingBid(false); + props.onBidSubmitted(true); }, async (msg) => { onTxFailed(msg); + props.onBidSubmitted(false); }, async (msg) => { onTxConfirmed(msg); // FIXME: we want to repull ALL events across all of Yobot every time a tx is confirmed? refreshEvents(); + props.onBidSubmitted(false); }, async (msg) => { userRejectedCallback(); @@ -181,6 +184,7 @@ const BidForm = ({ props }) => { } catch (e) { onTxFailed(); setPlacingBid(false); + props.onBidSubmitted(false); console.error("Placing bid returned:", e); } }; diff --git a/src/components/bidpage/BidPageMain.js b/src/components/bidpage/BidPageMain.js index 03d26bf..689026b 100644 --- a/src/components/bidpage/BidPageMain.js +++ b/src/components/bidpage/BidPageMain.js @@ -17,6 +17,7 @@ const BidPageMain = ({ projectId }) => { const [totalBids, setTotalBids] = useState("-"); const [highestBidInWei, setHighestBidInWei] = useState("-"); const [gettingActions, setGettingActions] = useState(true); + const [submittingBid, setSubmittingBid] = useState(false); const [alreadyPlacedBid, setAlreadyPlacedBid] = useState(false); const fetchUserOrdersAndTotalStats = async () => { @@ -164,11 +165,15 @@ const BidPageMain = ({ projectId }) => { return projectDetails; } + const onBidSubmitted = (submitting) => { + setSubmittingBid(submitting); + }; + return (