fattiger 5 өдөр өмнө
parent
commit
efad417c49

+ 2 - 2
src/hooks/usePaymentActions.js

@@ -166,7 +166,7 @@ const usePaymentActions = () => {
     const getPaymentConfig = (name) => {
         const type_num = parseInt(name);
         if (!isNaN(type_num)) {
-            name = PayTypeMap[name] || "card"
+            name = PayTypeMap[name] || "credit_card"
         } else {
             name = name || global.curGoods.pay_name;
         }
@@ -174,7 +174,7 @@ const usePaymentActions = () => {
     }
 
     const getWithdrawConfig = (type) => {
-        const key = PayTypeMap[type] || "card";
+        const key = PayTypeMap[type] || "credit_card";
         return PaymentGears[key];
     }
 

+ 1 - 8
src/hooks/useWithdrawInfo.js

@@ -142,13 +142,6 @@ const useWithdrawInfo = () => {
         }
 
         /// 判断提现信息是否缺损
-        if (cbType === WithdrawType.CashApp) {
-            if (!cashAppTag) {
-                global.showEditBindCashapp();
-                return;
-            }
-        }
-
         if (cbType === WithdrawType.Paypal) {
             if (!paypalEmail || !checkEmailFormat(paypalEmail)) {
                 global.showEditBindPaypal();
@@ -176,7 +169,7 @@ const useWithdrawInfo = () => {
 
     /** 获取CD剩余秒速  cbType: cashapp 1  paypal 2 */
     const getCooldownSec = useCallback((cbType) => {
-        const ts = cbType === WithdrawType.CashApp ? cashAppEditCd : paypalEditCd;
+        const ts = paypalEditCd;
         if (ts === 0) return 0;
         return Math.floor((ts - Date.now()) / 1000);
 

+ 1 - 1
src/widgets/HomeWithdraw/index.jsx

@@ -328,7 +328,7 @@ const HomeWithdraw = ({ data }) => {
                 <div className={styles.progressPreview}>
                     <span>{i18n.t('homeWithdraw.progressMsg', { taskNum: missionNum, cash: isEndless ? "" : global.DOLLAR + mission?.reward })}</span>
                     <span className={styles.nums}>
-                        {`{global.DOLLAR}{missionCompleteNum}/{global.DOLLAR}{missionNum}`}
+                        {`${missionCompleteNum}/${missionNum}`}
                     </span>
                 </div>
 

+ 3 - 22
src/widgets/WWithdraw/index.jsx

@@ -184,17 +184,9 @@ const WPayoutInfo = ({ pixType, onChange }) => {
     return (
         <div className={styles.payout_box}>
             <div className={styles.toggles}>
-                {renderToggle(PaymentGears.cashapp, WithdrawType.CashApp)}
                 {renderToggle(PaymentGears.paypal, WithdrawType.Paypal)}
             </div>
 
-            {
-                pixType === WithdrawType.CashApp && <div className={`${styles.info_box} ${cashAppTag ? styles.active : ""}`}>
-                    <TagIcon />
-                    <span>{cashAppTag || i18n.t("withdrawInfo.cash_app.cash_tag")}</span>
-                </div>
-            }
-
             {
                 pixType === WithdrawType.Paypal && <div className={`${styles.info_box} ${paypalEmail ? styles.active : ""}`}>
                     <EmailIcon />
@@ -207,13 +199,11 @@ const WPayoutInfo = ({ pixType, onChange }) => {
 
 const WPayoutEdit = ({ pixType }) => {
     const { paypalEditCd, cashAppEditCd, getCooldownSec } = useWithdrawInfo();
-    const cashapp = pixType === WithdrawType.CashApp;
     const paypal = pixType === WithdrawType.Paypal;
-    const sec = getCooldownSec(cashapp ? 1 : 2);
-    const ts = cashapp ? cashAppEditCd : paypalEditCd;
+    const sec = getCooldownSec(2);
+    const ts = paypalEditCd;
     const onClick = () => {
         if (sec > 0) return;
-        if (cashapp) global.showEditBindCashapp();
         if (paypal) global.showEditBindPaypal();
     }
     return (
@@ -242,7 +232,7 @@ const WWithdraw = ({ close }) => {
     const [amount, setAmount] = useState("");
     const [minAmount, setMinAmount] = useState(0);
     const [balance, setBalance] = useState(0);
-    const [walletType, setWalletType] = useState(Number(info?.PixType || "1") || WithdrawType.CashApp);
+    const [walletType, setWalletType] = useState(WithdrawType.Paypal);
     const dispatch = useDispatch();
     const navigator = useNavigate();
 
@@ -267,17 +257,8 @@ const WWithdraw = ({ close }) => {
         var max = Math.floor(info.MaxExchange / global.CASH_BASE);
         var max_config = max;
         var min_config = min;
-        // if (outLimit) {
-        //     if (type === 0) limit = outLimit.cashapp;
-        //     if (type === 1) limit = outLimit.paypal;
-        // }
 
         if (withdrawChannel) {
-            if (type === WithdrawType.CashApp && withdrawChannel.cashapp) {
-                max_config = withdrawChannel.cashapp.max;
-                min_config = withdrawChannel.cashapp.min;
-            }
-
             if (type === WithdrawType.Paypal && withdrawChannel.paypal) {
                 max_config = withdrawChannel.paypal.max;
                 min_config = withdrawChannel.paypal.min;

+ 2 - 2
src/widgets/WWithdrawalInfo/Security/WSecurityCheck.jsx

@@ -34,8 +34,8 @@ const WSecurityCheck = () => {
     const baseInfo = useSelector(getWithdrawBaseInfo);
     const { getCooldownSec, cashAppTag, paypalEmail } = useWithdrawInfo();
     const editSec = getCooldownSec(pixType);
-    const method = pixType === WithdrawType.CashApp ? "Cash App" : "PayPal";
-    const address = pixType === WithdrawType.CashApp ? cashAppTag : paypalEmail;
+    const method = "PayPal";
+    const address = paypalEmail;
 
     const show = useCallback((pixType, amount, callBack) => {
         const parsedAmount = Number(amount);