diff --git a/src/Components/PaymentSection/index.js b/src/Components/PaymentSection/index.js index ffb4ef0..31aebb7 100644 --- a/src/Components/PaymentSection/index.js +++ b/src/Components/PaymentSection/index.js @@ -82,12 +82,14 @@ const PaymentSection = () => { React.useEffect(() => { try { - const start = getCurrentPrice(); - const { buyPricePerCoin, id } = start.data; - console.log("background update", buyPricePerCoin); - console.log("buyP", buyPricePerCoin); - setCurrentPrice(buyPricePerCoin); - setOrderId(id); + getCurrentPrice().then((res) => { + const { buyPricePerCoin, id } = res.data; + + console.log("background update", buyPricePerCoin); + + setCurrentPrice(buyPricePerCoin); + setOrderId(id); + }); } catch (e) { console.log("error", e); toast.error("Loading Exchange Price. Poor Network Connection!", {