From 669e596ff7c7fb64cdf2a80a3d80f685c87727f3 Mon Sep 17 00:00:00 2001 From: "zhongyuan.zhao" Date: Wed, 18 Mar 2026 16:18:13 +0800 Subject: [PATCH] fix(waffo): filter waffo from generic payment selector, avoid duplicate buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When only Waffo was enabled, the generic payment method list showed a "Waffo (Global Payment)" button calling preTopUp (epay flow) instead of waffoTopUp, while the dedicated "Waffo 充值" section had the correct buttons. Fix: filter waffo entries from generic list and hide the "选择支付方式" column when no non-waffo methods exist. Co-Authored-By: Claude Opus 4.6 (1M context) --- web/src/components/topup/RechargeCard.jsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/web/src/components/topup/RechargeCard.jsx b/web/src/components/topup/RechargeCard.jsx index 3fc14722..f37d129b 100644 --- a/web/src/components/topup/RechargeCard.jsx +++ b/web/src/components/topup/RechargeCard.jsx @@ -291,11 +291,11 @@ const RechargeCard = ({ style={{ width: '100%' }} /> + {payMethods && payMethods.filter(m => m.type !== 'waffo').length > 0 && ( - {payMethods && payMethods.length > 0 ? ( - {payMethods.map((payMethod) => { + {payMethods.filter(m => m.type !== 'waffo').map((payMethod) => { const minTopupVal = Number(payMethod.min_topup) || 0; const isStripe = payMethod.type === 'stripe'; const disabled = @@ -355,13 +355,9 @@ const RechargeCard = ({ ); })} - ) : ( -
- {t('暂无可用的支付方式,请联系管理员配置')} -
- )}
+ )} )}