From cf3ba1529f1fe867b998eb74d5cca078c8d23ad3 Mon Sep 17 00:00:00 2001 From: Nikhil Saboo Date: Wed, 16 Oct 2024 13:07:06 +0530 Subject: [PATCH 1/4] Enable ztg payments via card --- pages/deposit.tsx | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/pages/deposit.tsx b/pages/deposit.tsx index 74c3103cd..1b8996d2a 100644 --- a/pages/deposit.tsx +++ b/pages/deposit.tsx @@ -287,20 +287,6 @@ const DepositPage: NextPage = () => { DepositPaymentMethod | undefined >("crypto"); - const disabledPaymentMethods = useMemo< - DepositPaymentMethod[] | undefined - >(() => { - if (currency === "ztg") { - return ["card"]; - } - }, [currency]); - - useEffect(() => { - if (currency === "ztg" && method === "buy" && paymentMethod === "card") { - setPaymentMethod(undefined); - } - }, [currency, method, paymentMethod]); - const encodedAddress = wallet.realAddress && currency && @@ -342,8 +328,6 @@ const DepositPage: NextPage = () => { labels={DepositPaymentMethodLabels} selected={paymentMethod} onChange={setPaymentMethod} - disabled={disabledPaymentMethods} - disabledItemClassName="!bg-misty-harbor text-sky-600" className="" itemClassName="text-center center outline-none rounded-lg bg-white p-3 leading-10" selectedItemClassName="!bg-ice-hush" From 121d0b4d80d72f88f5623ab3e26c04e1bebcf09c Mon Sep 17 00:00:00 2001 From: Nikhil Saboo Date: Wed, 16 Oct 2024 13:07:38 +0530 Subject: [PATCH 2/4] Link banxa on deposit page --- pages/deposit.tsx | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/pages/deposit.tsx b/pages/deposit.tsx index 1b8996d2a..56b0651bc 100644 --- a/pages/deposit.tsx +++ b/pages/deposit.tsx @@ -333,6 +333,47 @@ const DepositPage: NextPage = () => { selectedItemClassName="!bg-ice-hush" /> )} + {method === "buy" && + currency === "ztg" && + paymentMethod === "card" && + encodedAddress && ( +
+ +
+
+ Zeitgeist currency +
Zeitgeist Address:
+
+
+ {encodedAddress} + + {shortenAddress(encodedAddress, 12, 12)} + + +
+
+
+ After purchasing ZTG return to this page and select the Deposit + tab to move it to your account on Zeitgeist +
+
+ )} {method === "buy" && currency === "ztg" && paymentMethod === "crypto" && ( From 4aac279e2a176c6178e555fb7871a6d5ba822b5c Mon Sep 17 00:00:00 2001 From: Nikhil Saboo Date: Wed, 16 Oct 2024 13:08:26 +0530 Subject: [PATCH 3/4] Replace links to hydradx with hydration --- pages/deposit.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/deposit.tsx b/pages/deposit.tsx index 56b0651bc..a4794c5e4 100644 --- a/pages/deposit.tsx +++ b/pages/deposit.tsx @@ -381,7 +381,7 @@ const DepositPage: NextPage = () => { items={[ { label: "Hydra DX", - url: "https://app.hydradx.io/trade?assetIn=5&assetOut=12", + url: "https://app.hydration.net/trade/swap?assetIn=5&assetOut=12", }, { label: "Gate.io", url: "https://www.gate.io/trade/ZTG_USDT" }, ]} @@ -394,7 +394,7 @@ const DepositPage: NextPage = () => { items={[ { label: "DEX", - url: "https://app.hydradx.io/trade?assetIn=10&assetOut=5", + url: "https://app.hydration.net/trade/swap?assetIn=10&assetOut=5", }, { label: "CEX", From 23ca6dbd35196f96bcdabb692786af388aaddc97 Mon Sep 17 00:00:00 2001 From: Nikhil Saboo Date: Thu, 17 Oct 2024 15:56:19 +0530 Subject: [PATCH 4/4] Make card as default --- pages/deposit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/deposit.tsx b/pages/deposit.tsx index a4794c5e4..8e0ebd9a8 100644 --- a/pages/deposit.tsx +++ b/pages/deposit.tsx @@ -285,7 +285,7 @@ const DepositPage: NextPage = () => { const [currency, setCurrency] = useState("ztg"); const [paymentMethod, setPaymentMethod] = useState< DepositPaymentMethod | undefined - >("crypto"); + >("card"); const encodedAddress = wallet.realAddress &&